I have following form with jquery validate.
When I submit the form without entering any values, it shows error messages. But when I enter value in “Amount”
All error messages disappear when value is entered on one textbox
From the documentation for showErrors:
The arguments contain only those elements currently validated, which can be a single element when doing validation
ononblur
focusout
orkeyup
.
As you can see, the showErrors
option is working as designed. The new map
of messages does not retain the previous messages after new validation is completed. If one field is validated, then the map only contains the message for the one field, etc.
Just use wrapper and errorLabelContainer options, which, when used together, were designed to automatically keep an updated list of pending messages for the whole form...
wrapper: "li", // <- the LABEL will be inside of this
errorLabelContainer: "#errorSummaryList", // <- your UL element
DEMO: jsfiddle.net/y9o8du3q/