Jquery. Validate introduction-2

Source: Internet
Author: User
Jquery. Validate. js API description Reference http://ideabean.javaeye.comPlugin Methods
 
Nametypevalidate (options) returns: validator verifies the selected formvalid () returns: Boolean checks whether the verification passes rules () returns: Options returns the verification rule rules ("add", rules) of the element) returns: options add verification rules ("Remove", rules) returns: Options Delete verification rules removeattrs (attributes) returns: Options Delete special attributes and return themCustom selectorsNametype: blankreturns: array <element> filter without values: filledreturns: array <element> filter with values: uncheckedreturns: array <element> filter of unselected ElementsUtilitiesNametypejquery. Format (template, argument, argumentn...) returns: String replaces {n} in the template with parameters }.Validator
The 
 validate method returns A validator object, which has many methods, allowing you to use the  Program  that triggers verification or change the content of the form. below is a list of commonly used. form () returns: Boolean indicates whether to verify whether a successful or failed element (element) returns is returned by the form. boolean indicates whether a single element is successful or failed. resetform () returns: undefined restores the previously verified form to the original state showerrors (errors) returns before verification: undefined displays the specified error message  built-in validation methods  nametypesetdefaults (defaults) returns: Undefined changes the default setting addmethod (name, method, message) returns: undefined adds a new verification method. the name, JavaScript method, and default information must be included. addclassrules (name, rules) returns: Undefined adds the combined verification type addclassrules (Rules) returns: undefined adds the combined verification type  built-in validation methods  
 nametyperequired () returns: Boolean is required. The verification element required (dependency-expression) returns: Boolean is dependent on the expression result. required (dependency-callback) returns: Boolean required element depends on the result of the callback function. remote (URL) returns: Boolean requests remote verification. The URL is usually a remote call method minlength (length) returns: Boolean sets the minimum length maxlength (length) returns: Boolean sets the maximum length rangelength (range) returns: boolean sets a length range of [min, Max] min (value) returns: Boolean sets the minimum value. max (value) returns: Boolean sets the maximum value. range (range) returns: Boolean value range email () returns: Boolean verify email format URL () returns: Boolean verify connection format date () returns: boolean verification Date Format (similar to the 30/30/2008 format, do not verify date accuracy only verify the format) dateiso () returns: Boolean developed Iso-type Date Format datede () returns: Boolean verifies the German Date Format (293474.1994 or 1.1.2006) number () returns: Boolean verifies the decimal number (including decimal digits) numberde () returns: booleanmakes the element require a decimal number with German format. digits () returns: Boolean verification integer creditcard () returns: Boolean verification credit card number accept (Extension) returns: Boolean verification string of the same suffix to (other) returns: boolean verifies whether the content of the two input boxes is the same. For other APIs, refer to the custom section in the next chapter. 

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.