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.