Jquery collates the default validation rules

  • 2020-03-30 02:27:38
  • OfStack

(1) the required: true              Will lose field
(2) remote: "check. PHP"     Use the ajax method to call check.php to validate the input value
(3) email: true                    You must enter an E-mail message in the correct format
(4) url: true        You must enter the url in the correct format
(5) date: true      Must enter the correct format of the date date check ie6 error, use with caution
(6)dateISO:true must enter the correct format of the date (ISO), e.g., 2009-06-23, 1998/01/22, only format, not validity
(7) number: the true  You must enter a valid number (negative number, decimal number)
(8) who: true                  You have to enter an integer
(9) creditcard:   You must enter a valid credit card number
(10) equalTo: "# field"       The input value must be the same as #field
(11) accept:         Enter a string with a valid suffix (the suffix of the uploaded file)
Enter a string with a maximum length of 5 (Chinese characters count as one character)
(13) minlength: 10                               Input string with minimum length of 10 (Chinese character counts as one character)
(14) rangelength: [5, 10]   The input length must be between 5 and 10 ")(Chinese characters count as one character)
(15) range: [5, 10]               The input value must be between 5 and 10
(16) Max: 5             The input value cannot be greater than 5
Min (17) : 10           The input value cannot be less than 10


Related articles: