On jQuery site Plugins/Validation/Methods/digits
there is example:
$("#myform").validate({
rules: {
field: {
required: true,
digits: true
}
}
});
I would like to decide if validation needed by function.
I have a problem only for digits specifically when I try next:
$("#myform").validate({
rules: {
field: {
required: true,
digits: function() { return false; }
}
}
});
Validation plugin still require digits only for my input field.
How to switch digits validator by function in jQuery validate plugin?
i think you need
try this