Masked Input Plugin 1.0
I finally made it to 1.0! This release doesn't add anything new other than a few minor cosmetic code changes.
So, without further adieu, I present my Masked Input Plugin.
I finally made it to 1.0! This release doesn't add anything new other than a few minor cosmetic code changes.
So, without further adieu, I present my Masked Input Plugin.
Really, really neat mask implementation! Thanks for sharing it!
I love this plugin. However it seems like handling the backspace key on Mac OS X is all messed up : /. I’ll try and see if I can come up with a patch for it, but if you have any idea on what might be causing this I’d be glad to hear it.
great work thats a realy usefull plugin! is there any way to get real date validation with this? im mean if i enter 2007/12/3* the last number only can be 0 or 1.
if i enter 2007/12/2* the last number can be 0 till 9. this would be great!!
Great job!
the removeRow has a bug, however. In Firefox, at least.
If you try to removeRow(0) when you have only one row inserted, the grid columns are messed up!
I missed an “unmask” method, and since I’m using your code, here follows my changes:
243c243,244
};
> this._checkVal = checkVal; // allows later removing
246c247,257
$.fn.unmask = function() {
> this.unbind();
> var el = this.get(0);
> if ($.browser.msie) {
> el.onpaste = null;
> } else if ($.browser.mozilla) {
> el.removeEventListener(’input’, el._checkVal, false);
> }
> el._checkVal = null;
> };
> })(jQuery);
I love the idea behind this plugin except my only question is why is it so hard to find a plugin that does validation + masked input? If you were to add validation this would be a killer plugin!
I love it. Amazing and simple. More simple than any other masked plugin that I’ve seen. On another note, it might not work with the newest version of Netscape. I have it running on our checkout page at https://www.cablesforless.com/ - if you like to see it in action add something to you cart and click checkout.
Hi! Your plugin is very good but it has one disadvatage. There are no user-defined validation. I think it will be nice
to add to argument settings field ‘validate’, that like a ‘completed’ will represent a function returning boolean value and use it in checkVal like this
if(!s.match(re) || (settings.validate && !settings.validate(input)))
Great plugin… just one question. How does the “completed” option work? I would like to alter the functionality so that if a field is incomplete, it doesn’t erase everything in the field. Thanks.
I love your plugin. Very well done! I am using to format phone numbers and I wanted to know if there was a way to optionally allow for extensions. In other words, a user could enter this:
555-555-5555
but continue if he wanted to to enter this;
555-555-5555 x5555
Any ideas?
Good work with the plugin! I’ve the same requirement as above where the user can enter a zip code with format 99999 or 99999-9999. Is there an either or option?