开发者

How to make where do the error message show in jquery.validate?

开发者 https://www.devze.com 2023-02-03 09:10 出处:网络
How to make whe开发者_开发技巧re do the error message show in jquery.validate??You can check out the documentation here: http://docs.jquery.com/Plugins/Validation

How to make whe开发者_开发技巧re do the error message show in jquery.validate??


You can check out the documentation here: http://docs.jquery.com/Plugins/Validation

You define the .error style and jQuery creates the element as needed (as the next sibling to the input field) on validate.

Here is their sample style:

label.error { float: none; color: red; padding-left: .5em; vertical-align: top; }

And here is an example of an element created on error:

<label for="cname" generated="true" class="error">Please enter at least 2 characters.</label>
0

精彩评论

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

关注公众号