Could you take a look at this http://jsbin.com/osolo/ , please?
If you enter a letter in Min Age, not a number, then click to confirm it using the jquery validator, using a regular expression in a custom validation method, this works, but now I want to make it more dynamic.
In the custom validation method, the line
var data = $(element).metadata();
captures metadata from the item being checked, what I would like to do is use
data.validateOptions.regex
as a regular expression for checking with (I don’t see that this is a problem), what I see is the problem, is that if the field does not check, but does not use the message that is provided when called
jQuery.validator.addMethod(name, method, message)
I would like to use
data.validateOptions.message
, - ?
OneShot