开发者

styling jquery validation error text

开发者 https://www.devze.com 2023-02-16 06:19 出处:网络
I\'m using jquery validation and would like customize the error messages that are displayed. By default the validation errors appear to the right t开发者_运维技巧he input fields.I specifically would

I'm using jquery validation and would like customize the error messages that are displayed.

By default the validation errors appear to the right t开发者_运维技巧he input fields. I specifically would like to have all the errors to appear at the top of the page in a styled div we have been using.

Is this possible with library or would it be a better option to just write my own validation stuff this situation?

Any thoughts? Thanks.


Hi Ray I'm sure you've found it by now but if not, this can be done using the errorLabelContainer option. See jquery.validation docs.

e.g.

$("#myform").validate({
  errorLabelContainer: "#messageBox"
  });
0

精彩评论

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