This article describes examples of the form verification plug-in Validation application. For more information, see jquery. validation is an excellent jquery plug-in that can verify client forms and provides many customizable attributes and methods for good scalability. Now, based on the actual situation, I organize the verification frequently used in the project into an instance DEMO. This article explains this instance to understand the application of Validation.
Verification involved in this instance includes:
Username: length, character verification, and repeated ajax verification (whether the user exists ).
Password: length verification. repeat the password verification.
Email: verify the email address.
Landline phone: Chinese mainland landline phone number verification.
Mobile phone number: Mainland China mobile phone number verification.
URL: verify the website URL.
Date: standard date format verification.
Number: integer, positive integer verification, number range verification.
ID card: Chinese mainland ID card number verification.
Zip code: Mainland China Zip code verification.
File: file type (suffix) verification. for example, only images can be uploaded.
IP address: verify the IP address.
Verification code: ajax verification code.
Usage:
1. prepare the jquery and jquery. validate plug-ins.