Summary: For some reason, the parameters getting passed to the callback function of jQuery.validator.addMethod is
NaN
. I can't understand why as when adding the rule to the adapters, everything is getting passed correctly. I'm using the jQuery Validation Plugin 1.8.0 and testing on FF 3.5.3.
Thanks for any help!
Additional Details: Within the jQuery.validator.addMethod's callback method, the
params
parameter always is NaN instead of object. Am I missing something here?
Here's the relevant jquery code:
jQuery.validator.unobtrusive.adapters.add('myrule', ['p1', 'p2'], function (options) {
options.rules['myrule'] = { p1: options.params.p1, p2: options.params.p2};
...
});
jQuery.validator.addMethod('myrule', function (value, element, params) {
}, '');