i have a input filed which i am validating using jquery
i am trying to allowing it wild card or some validation like allowing 10 digits.
When user input * as input there should be no other validation. if user not entered * there other should work
i have created a method as
jQuery.validator.addMethod("exactlength", function(value, element, param) {
return this.optional(element) || value.length == param;
});
Ether * or digits with fixed lenght.
You can use
string.Matchand JavaScript regular expressions:http://www.regular-expressions.info/javascript.html