开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜