Jquery Validate related parameters
Defining Chinese messages
var cnmsg = {
Required: "Required field",
Remote: "Please fix this field",
Email: "Please enter the correct format of e-mail",
URL: "Please enter a valid URL",
Date: "Please enter a valid date",
Dateiso: "Please enter a valid date (ISO).",
Number: "Please enter a valid digit",
Digits: "Can only enter integers",
CreditCard: "Please enter a valid credit card number",
Equalto: "Please enter the same value again",
Accept: "Please enter a string with a valid suffix name",
Maxlength:jQuery.format ("Please enter a string with a maximum length of {0}"),
Minlength:jQuery.format ("Please enter a string with a minimum length of {0}"),
Rangelength:jQuery.format ("Please enter a string between {0} and {1}"),
Range:jQuery.format ("Please enter a value between {0} and {1}"),
Max:jQuery.format ("Please enter a value of {0} max"),
Min:jQuery.format ("Please enter a value of minimum {0}")
};
Jquery.extend (JQuery.validator.messages, cnmsg); Jquery Validate validation rules
(1) Required:true required field
(2) Remote: "check.php" using Ajax method call check.php Validate input value
(3) Email:true must enter e-mail in the correct format
(4) Url:true must enter the correct format of the URL
(5) Date:true must enter the correct format of the date
(6) Dateiso:true must enter the correct format of the date (ISO), for example: 2009-06-23,1998/01/22 Verify the format only, do not validate the validity of
(7) Number:true must enter a valid number (negative, fractional)
(8) Digits:true must enter an integer
(9) CreditCard: Must enter a valid credit card number
(10) Equalto: The "#field" input value must be the same as #field
(one) Accept: Enter a string that has a legal suffix (the suffix of the uploaded file)
(5) The string with a maximum length of maxlength:5 input (Chinese characters counted as a character)
(minlength:10) Enter a string with a minimum length of 10 (Chinese characters counted as one character)
(rangelength:[5,10] Enter a string that must be between 5 and 10 ") (Chinese characters are counted as one character)
(a) range : [5,10] Input value must be between 5 and 10
(+) Max:5 input value cannot be greater than 5
Min:10