Problem:
you need to only allow the user to input certain characters into the input box, and you want a jquery plugin to do it!
Solution:
the following lets you specify which chars (regexes or'ed together) are allowed in the input.
i added a small demo for the plugin, check it out here
get the plugin here
Just a small question. Will this "block" even the keyboard shortcuts like Ctrl + C or Ctrl + V ?
ReplyDelete@diz: no, it will not, but if you need to do that, i think masked input plugin does that, and you could probably rip out that logic from that plugin. this was meant to be a lightweight version of the same thing, without the "mask".
ReplyDeleteI suggest adding validation to the inputs on submit, and check for stuff that was pasted in there, or, fix it =)
This is different than using validation how?
ReplyDelete@Chris:
ReplyDeletei assume you mean using the "validation plugin". Its different because it is very light weight. it doesnt do the 20 billion things that validation does, which can be a good thing sometimes.