Is it possible to write a dependency callback for the minValue rule, such as you can with the required text?
I have 2 required fields -> Price Paid and Price Seen (for a rebate form). I tried to write something like this:
minValue: function(element) {
$("#PP_PriceSeen").val();
}
if I try to set an alert or something, I do get the correct value, but it isnt being passed into the rule. Is this only allowed for the ‘required’ option?
Thanks
It would be easy enough to accomplish this with a custom validator rule:
This defines a new rule
minDependencythat accepts a selector as a parameter. The selector’s value is compared against the element under validation.Example: http://jsfiddle.net/andrewwhitaker/wqSGE/