JQuery Validate plug-in [Form validation properties Introduction]

Source: Internet
Author: User

Detailed introduction Validate plug-in

$ ("#form的Id"). Validate ({

})

Properties
Rules Describe
Required:true Fields that must be entered
Required: "#aa: Checked"

The value of the expression is true, then validation is required.
Required:function () {} Returns to True, indicating that validation is required
Remote: "check.php" Use the Ajax method to call check.php to validate the input values.
Email:true You must enter an e-mail message in the correct format.
Url:true You must enter a URL in the correct format
Date:true You must enter a date in the correct format. Date Check IE6 error, use with caution.
Dateiso:true You must enter the correct format for the date (ISO), for example: 2009-06-23, 1998/01/22. Verify the format only and do not validate the validity.
Number:true You must enter a valid number (negative, fractional).
Digits:true You must enter an integer.
Creditcard:true You must enter a valid credit card number
Equalto: "#field" The input value must be the same as #field
Accept Enter a string with a valid suffix name (the suffix of the upload file).
Maxlength:5 Enter a string with a maximum length of 5 (Chinese characters are counted as one character).
Minlength:10 Enter a string with a minimum length of 10 (Chinese characters are counted as one character).
RANGELENGTH:[5,10] Enter a string that must be between 5 and 10 (Chinese characters are counted as one character).
RANGE:[5,10] The input value must be between 5 and 10.
Max:5 The input value cannot be greater than 5.
Min:10 Input value cannot be less than 10
Debug:true Validate not submit form (debug)
Ignore:". Ignore" Ignoring certain elements does not validate
errorplacement :function(error, element){ error.  AppendTo(element.  Parent()); }
Indicates where the error was placed, by default: Error.appendto (Element.parent ()), where the error message is placed after the element being validated.
Success
The element to be validated passes the validated action, if followed by a string, as a CSS class, or a function.

JQuery Validate plug-in [Form validation properties Introduction]

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.