Home > front end >  For help! How to adjust the validate location according to the custom error
For help! How to adjust the validate location according to the custom error

Time:09-21

As shown in figure, how to put the information behind the input box below the input box

Js code is as follows:
$(function () {
$(' # form1). Validate ({
Rules: {
The username: 'required',
Password: {
Required: true,
Who: true,
Range: [6, 12]
},
Repassword: {
Required: true,
EqualTo: "[name='password']",
Range: [6, 12]
},
Email: 'email'
},
Messages: {
Username: "user name cannot be empty,"
Password: {
Required: "password cannot be empty,"
Who: "password must be a number,"
Range: "password length between 6 and 12"

},
Repassword: {
Required: "please confirm password",
EqualTo: "two input password is not consistent,"
Range: "password length between 6 and 12"
}
}

})
})

The form code:

Password: & lt;/span>

Repeat password: & lt;/span>


- & gt;




  • Related