07 Sep, 2008
jQuery Method for Validation Plugin – "field must include at least one number"
Posted by: Jennifer In: jquery
Here's a method you can use with the validation jQuery plugin to make sure a field (like a password field) includes at least one number.
$.validator.addMethod("atleastonedigit", function(pass) {
if (pass == "") {
return true;
}
return ((/[0-9]+/).test(pass));
}, "This field must contain at least one number");
Related posts:
- Delink Pages Plugin (Plugin and this post last updated: 10/20/2009 – Latest Plugin...
- Multiple Featured Content Galleries On a site I was working on recently, the client...
Related posts brought to you by Yet Another Related Posts Plugin.
scriptygoddess
