[jQuery] Re: Create a custom rule

2009-10-19 Thread Jörn Zaefferer
The first argument, value, refers to the actual value-attribute. You'll probably want to use the third argument, eg. param: $.validator.addMethod('hasClass', function(value, element, param) { reurn $(element).hasClass(param); }, jQuery.format('Please check the button')); Also a bit simpler

[jQuery] Re: Create a custom rule

2009-10-19 Thread Giovanni Battista Lenoci
Jörn Zaefferer ha scritto: The first argument, value, refers to the actual value-attribute. You'll probably want to use the third argument, eg. param: $.validator.addMethod('hasClass', function(value, element, param) { reurn $(element).hasClass(param); }, jQuery.format('Please check the