jQuery Validator - Dynamic Text

Posted by James on Stack Overflow See other posts from Stack Overflow or by James
Published on 2010-06-08T17:23:16Z Indexed on 2010/06/08 19:12 UTC
Read the original article Hit count: 185

Filed under:
|
|

Adding a validator to my form:

jQuery.validator.addMethod('whatever', function(val, el) {
// whatever goes here
}, 'A maximum of ' + $('#my_id_here').val() + ' categories can be selected.');

This doesn't fly. I always get undefined. Is this a good, simple way to do this?

Thanks

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery