Home > Web Front-end > JS Tutorial > body text

Detailed explanation of knowledge points based on jQuery.Validate verification library_jquery

WBOY
Release: 2016-05-16 17:35:16
Original
1090 people have browsed it
1. If errorContainer, errorLabelContainer, and wrapper are set, errorPlacement will not work
Copy code The code is as follows :

...
$(document).ready(function(){
$("#myform").validate({
errorContainer: "#messageBox1, #messageBox2",
errorLabelContainer: "#messageBox1 ul",
wrapper: "li",
debug:true,
...

errorContainer: Multiple containers can be configured. The messageBox2 element here is not packaged, but only displays and hides this element when an error occurs.

errorLabelContainer: A container that displays error information. It hides or displays the error container based on the verification results.

wrapper: The name of the outer tag that displays the error message.

errorElement: Specify the name of the html label that displays the verification error message (default is label)

For example, when errorElement is set to span


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template