Jquery. Validate API: jquery_validateapi .rar
Deep Learning about jquery. validatejquery. Validate Chinese API and application example (3) advanced verification Basics
1. Rules for using class verification:
In the class, you can use: required, email, number, URL, date, dateiso, datede, digits, creditcard, and phoneus.
Attributes can be added: minlength, maxlength, Min, Max, accept, and remote (Note: Check whether the returned result is bool or XML). Allow to = '# password'
No built-in methods for use are found: required (dependency-expression), required (dependency-callback), range, rangelength
2. Rules for JSON object verification:
Define the following definition in class: class = "{validate: {required: True, minlength: 6, messages: {required: 'Enter the password', minlength: 'The password is too short, at least 6 digits '}}}"
We can still define number: True, email: True, URL: True, Date: True, dateiso: True, datede: True, digits: True, creditcard: True, phoneus: True
Min: 3, Max: 10, minlength: 3, maxlength: 10, required: '# Other: checked' [The expression function here is required (dependency-expression )]
Compared with the class, we can use the range method. It can be defined as a number range: [3, 10], the string length rangelength: [3, 10], remote: URL, accept: '.csv |. JPG |. doc |. docx', pointer to: '# password'
No built-in method for use found: required (dependency-callback)