jQuery Validation Single Message for each rule
I have an application with several input fields that have the required jQuery validation rule.
If the fields are invalid I want to highlight them all however I only want a single messag开发者_如何学Ce for required to be displayed at the top of the page.
I am displaying the messages on the top of the page with the errorLabelContainer
attribute.
What is the best way to limit each rule to display only a single message?
When processing the validation of input filed's you could create a new String, each time there is a validation error append the string with the validation error from each input field. Then set the inner html of errorLabelContainer to the string value.
精彩评论