What is the jQuery formValidator form validation plug-in?
jQuery formValidator form validation plug-in, which is based on the jQuery class library and realizes the separation of js scripts from page html code. You can divide multiple verification groups, and the verification of each group does not affect each other. For a form object, you only need to write a line of code to easily implement countless (theoretically) script controls. Currently, 5 major verification methods are supported, namely: inputValidator (control of character length, value range, and number of selections for input, textarea, and select controls), compareValidator (provides comparison of two objects, currently can compare strings and numeric type), ajaxValidator (data verification on the server through ajax), regexValidator (providing an extensible regular expression library), functionValidator (external functions can be used for verification)
The biggest differences between this plug-in and other verification controls are three points:
1. The verification function can be expanded.
Controls on Chinese, English, numbers, integers, real numbers, email address format, URL format based on HTTP protocol, phone number format, mobile phone number format, currency format, postal code, ID number, QQ number, date, etc., etc. The form validation control is hard-coded in the code, while the formValidator is extended through external js files. You can infinitely expand these functions by writing regular expressions and functions.
2. Complete separation of verification code and html code is achieved.
All your information does not need to be configured on the verification form element, you only need to configure your information on js. Keep the work of art (interface) and javascript engineers from being intertwined
3. You only need to write one line of code to complete all verification of a form element. You only need to write one line of code to complete all the controls
Supports validation of all types of client controls
Supports all jQuery selector syntax, as long as the control has a unique ID and type attribute
Supports function and regular expression extensions. The extension library formValidatorReg.js is provided, and you can freely add and modify the content inside.
Supports 2 verification modes. The first type: text prompt (showword mode); the second type: pop-up window prompt (showalert mode)
Supports multiple parity groups. If a page has multiple submit buttons, different submissions must be made separately, and different verifications must be done before submission, so you have to use the verification group function.
Supports 4 status information prompt functions, and can flexibly control whether the 4 statuses are displayed. The first type: Prompt when the web page is first opened; The second type: Prompt when the focus is obtained; The third type: Prompt when the verification is successful when the focus is lost; The fourth type: Prompt when the verification fails when the focus is lost. Error message.
Supports automatic construction of prompt layers. Precise positioning is possible.
Support custom error message.
Supports control of the control's character length, value range, and number of selections. The value range supports numeric and character types; the selected number supports radio/checkbox/select controls.
Supports comparison of two control values. Currently, string and numeric types can be compared.
Supports server-side verification.
Support input format verification.
Home page: index.html
Expand