I\'m using the validate plugin from http://bassistance.de/jquery-plugins/jquery-plugin-validation/
What i\'m trying to find is a way to make some of my form fields a
Simply add a custom validator, and use it like this:
jQuery.validator.addMethod("accept", function(value, element, param) { return value.match(new RegExp("." + param + "$")); });
Only numbers:
rules: { field: { accept: "[0-9]+" } }
Only letters
rules: { field: { accept: "[a-zA-Z]+" } }