Brian J. Cardiff schrieb:
I'm including some complex validation through remote mechanism. My
problem is that this validation took a while, so I would like to
disable the validation on keypress after the user try to submit a form
with an invalid value in that field.
Is that possible? If so, how?
You can specify your own onkeyup-option and defer to the original
implementation. Something like this:
$(...).validate({
onkeyup: function(element) {
if ( checkIfElementShouldBeValidated(element) ) {
$.valiadator.defaults.onkeyup.apply(this, arguments);
}
}
});
You could also copy the default implementation and modify the filter.
I'd need a bit more context for the checkIfElementShouldBeValidated
function, but hopefully this gets you far enough anyway.
Jörn