You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a form validate configured with an invalidHandler, which would trigger blur() on an <select> inside the form. The <select> is configured to be ignored by the validator.
However, when calling .valid(), even when there is another invalid field, it still returns true.
This weird behaviour is occurring because when you call blur method on the select element in the invalidHandler, jquery-validation will internally trigger the onfocusout event whose handler will call the prepareElement method which in turn calls the reset method. It is this method that wipes out all the error reported so far in the validation process. ATM, you can work around this problem by adding onfocusout: false to the option passed to the validate method. I updated your jsFiddle with this workaround.
I have a form validate configured with an
invalidHandler
, which would triggerblur()
on an<select>
inside the form. The<select>
is configured to be ignored by the validator.However, when calling
.valid()
, even when there is another invalid field, it still returnstrue
.Check this fiddle as the example:
http://jsfiddle.net/cBwzN/1/
The text was updated successfully, but these errors were encountered: