SoFunction
Updated on 2025-03-01

A very powerful and complete web form validator Validator v1.05

Form verification has always been a headache for web designers. The form verification class Validator was written to solve this problem. It aims to free designers from the complex form verification and focus on improving web page design and function.

Validator is a custom attribute of pseudostatic classes and objects based on JavaScript technology. It can verify the input of form items in a web page accordingly, allowing multiple forms to be verified at the same time on the same page. After being familiar with the interface, you can also verify specific form items or even just a certain string. Because it is a pseudostatic class, it does not need to be instantiated when calling, and it is called directly with "class name +.grammar + attribute or method name". In addition, Validator also provides 3 different error prompt modes to meet different needs.

Validator can currently implement verification types:
[JavaScript] version
Validator can currently implement verification types:
1. Whether it is empty;
2. Chinese characters;
3. Double byte characters
4. English;
5. Numbers;
6. Integer;
7. Real numbers;
address;
9. URLs that use HTTP protocol;
10. Phone number;
11. Currency;
12. Mobile phone number;
13. Postal code;
14. ID number (1.05 enhanced);
Number;
16. Date;
17. Password that complies with security rules;
18. Repeat value of a certain item;
19. Comparison of the relationship between two numbers;
20. Determine whether the input value is in the (n, m) interval;
21. Enter character length limit (can be compared byte);
22. The selection judgment of radio buttons with the same name;
23. Limit the number of selected multiple-choice buttons with the same name;
24. Custom regular expression verification;
25. File upload format filtering (1.04)
Running environment (client):
Tested with IE6.0+SP1 and Mozilla Firefox 1.0 under Windows Server 2003;
Netscape test under Lunix RedHat 9 passed;

For client form verification, this Validator written based on JavaScript can basically meet the needs of the client. You can download the CHM file:

Click to download
autobiography: Photo upload:
[Ctrl+A Select all Note:Introducing external Js requires refreshing the page before execution]