Detailed description of knowledge points in the validation Library Based on jQuery. Validate

Source: Internet
Author: User

1. If errorplaciner, errorLabelContainer, and wrapper are set, errorPlacement does not work.
Copy codeThe Code is as follows:
...
$ (Document). ready (function (){
$ ("# Myform"). validate ({
ErrorContainer: "# messageBox1, # messageBox2 ",
ErrorLabelContainer: "# messageBox1 ul ",
Wrapper: "li ",
Debug: true,
...

ErrorContainer: You can configure multiple containers. Here, the messageBox2 element is not packaged, but this element is displayed and hidden when an error occurs.

ErrorLabelContainer: Indicates the container that displays the error message. The container is hidden or displayed based on the verification result.

Wrapper: Name of the outer tag with the error message displayed.

ErrorElement: Specifies the html Tag name for displaying verification error information (label by default)

For example, if errorElement is set to span

<SPAN class = checked htmlFor = "cusername" generated = "true"> </SPAN>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.