Home >Web Front-end >JS Tutorial >A very powerful and complete web form validator Validator v1.05_form effects
Form validation has always been a headache for web designers. The form validation class Validator was written to solve this problem. It aims to free designers from complicated form validation and focus on the design and functionality of web pages. on improvements.
Validator is a pseudo-static class and custom attribute of an object based on JavaScript technology. It can perform corresponding verification on the input of form items in the web page, allowing multiple forms to be verified simultaneously on the same page. You can also do this after you are familiar with the interface. Validate a specific form item or even just a string. Because it is a pseudo-static class, it does not need to be instantiated when calling. It can be called directly with "class name. Syntax attribute or method name". In addition, Validator also provides 3 different error prompt modes to meet different needs.
Validator’s current validation types are:
[JavaScript] version
Validator’s current validation types are:
1. Whether it is empty;
2. Chinese characters ;
3.Double-byte character
4.English;
5.Number;
6.Integer;
7.Real number;
8.Email address;
9 .Website using HTTP protocol;
10. Phone number;
11. Currency;
12. Mobile phone number;
13. Postal code;
14. ID card number (1.05 enhancement) ;
15. QQ number;
16. Date;
17. Password that complies with security rules;
18. Repeated value of a certain item;
19. Comparison of the relationship between two numbers;
20. Determine whether the input value is in the (n, m) range;
21. Input character length limit (can be compared by bytes);
22. Determine the selection of radio buttons with the same name;
23. Limit the number of selected multi-select buttons with the same name;
24. Customized regular expression verification;
25. File upload format filtering (1.04)
Runtime environment (client ):
Passed the test with IE6.0 SP1 and Mozilla Firefox 1.0 under Windows Server 2003;
Passed the Netscape test under Lux RedHat 9;
For client-side form validation, this is based on JavaScript The Validator written can basically satisfy all requirements. Specifically, you can download the CHM file: Validator.CHM download
Click to download