JQuery form plugin jquery. form. js and jquery form validation plugin
Overview
JQuery Form Plugin allows you to easily upgrade forms submitted in HTML Form to forms submitted using AJAX technology.
The main methods in the plug-in are ajaxForm and ajaxSubmit, which can collec
A simple and practical easyvalidator validation framework.
Detailed reference: http://wangking717.iteye.com/blog/769021
Demo Demo: http://easyvalidator.googlecode.com/svn/trunk/index.html
Latest Download Address: http://code.google.com/p/easyvalidator/downloads/list
I. Documents required
1, Validate.css
2, Jquery.js (self-selected version)
3, Validate.pack.js
Import the above 3 files into a JSP page.
Second, how to use
Form code:
Third, the effec
JQuery validation jQuery Validate Form Verification details1. Import the js Library
Ii. Default verification rules
(1) required: true Mandatory Field(2) remote: check. php Use ajax to call check. php to verify the input value(3) email: true You must enter an email in the correct format.(4) url: true Enter the URL
){ return ...?$/i.test(value); }, message: 'Please enter a valid email address.' }, url: { validator: function(value){ return ...?$/i.test(value); }, message: 'Please enter a valid URL.' }, length: { validator: function(value, param){ var len = $.trim(value).length; return len >= param[0] len
Custom validation rules
When adding a new validation rule, it is best not to do it in the EasyU
default mechanism of jquery. validate plug-in, the change event of some form elements does not trigger the verification of the current element, so that the interface cannot feedback the verification status of the element in real time. This is used to automatically register special events of some elements, and actively trigger element verification in these event callbacks.
3. Example
From the demo-related l
Introduction to JQuery Validate Plug-ins
The JQuery Validate plug-in provides a powerful validation feature for forms, making client form validation simpler, while providing a wide range of customization options to meet the needs of the application. The plug-in bundles a set of useful authentication methods, including
About ValidFormThis is a good jquery form validation plug-in that almost satisfies any validation needs, and just one line of code can take care of the entire station's form validation.$ (' form '). ValidForm ();Why can it be so convenient? The core idea of plug-ins is to bind all
JQuery Validate Form Verification plug-in-use jquery. metadata. js to write validation rules directly in the class attribute and define the error message, validatemetadata
1. Download dependency packages
Network Disk download: https://yunpan.cn/cryvgGGAQ3DSW access password f224
2. Add another plug-in jquery. metadat
onlyNospecialcaracters: No special characters allowedOnlyletter: Letters onlyExemptstring: Will not validate if the string matchDate: Invalid date, must be in YYYY-MM-DD formatFunccall: Validate custom functions outside of the engine ScopeCustomizations
Custom RegEx rules:You can create custom rules easily, only add your custom rule in the JSON object, you can take telephone as an example, just copy and paste under it.
"Telephone ":{
"RegEx": "/^
See figure below:
Example of validation: http://www.position-relative.net/creation/formValidator/
Official address: http://www.position-absolute.com/articles/jquery-form-validator-because-form-validation-is-a-mess/
This plugin supports most browsers, but due to the use of the CSS3 Shadow and fillet style, in IE brow
50 jquery plugins for form functionality, validation, security and customisation
To be honest, entering a form is always a pain point. What about developers? You can create a form to say they are more painful. No one will really like them. For developers, the most difficult challenge when it comes to form development is not just to create a simple and fast application for users, however, it must be as conve
The model validation we've been talking about before is limited to server-side validation, where the Web servers validate the request data against the appropriate rules. If we can validate the data entered by the user in the client (browser), it will reduce the frequency of requests to the server, thereby easing the pressure on Web server access. Asp. MVC 2.0 and its previous version used ASP.net ajax for c
The Validation (validate) plugin provides another way to add validation to a form without needing to change the HTML of the field. In addition, this plugin provides a wide range of additional options to control how it works. We set these options by passing an object's direct amount to the Validate () function, which contains a separate object for each option. For exampl
input box to modify the value of the input box, also support the keyboard up and DOWN ARROW keys to change the input value, the call format is as follows:$ (selector). Spinner ({options});The selector parameter is a text input box element, optionally the options parameter is a configuration object for the spinner () method, where you can set the maximum and minimum values for the input, get the change values, and set the corresponding events.9.9. tooltip plugin--tooltip tooltip plug-in can cust
valid number.",9Digits: "Please enter only digits.",TenEqualto: "Please enter the same value again.", OneMaxLength: $.validator.format ("Please enter no more than {0} characters." ), AMinLength: $.validator.format ("Please enter at least {0} characters." ), -Rangelength: $.validator.format ("Please enter a value between {0} and {1} characters long." ), -Range: $.validator.format ("Please enter a value between {0} and {1}.") ), theMax: $.validator.format ("Please enter a value of less than or eq
letter cannot have @)
OnBlur: Text hint that loses focus (if the specified style is in front of the style name, so the text tip cannot have @) (validation failure prompt)
Onsucces: Validates a successful text hint (if the specified style is in front of the style name, so the text hints that the initials cannot have @)
TIPID: Control ID (*) used to display the hint information
Combination example: {required
See figure below:
Example of validation: http://www.position-relative.net/creation/formValidator/
Official address: http://www.position-absolute.com/articles/jquery-form-validator-because-form-validation-is-a-mess/
This plugin supports most browsers, but due to the use of the CSS3 Shadow and fillet style, in IE brow
Some time ago, the AJAX Chinese encoding problem occurred again, leading to duplicate member name detection failure. However, the problem occurred this time due to the remote verification of the Validation plug-in. Based on the previous experience
The Code is as follows:
ContentType: "application/x-www-form-urlencoded; charset = UTF-8 ",
Added to the parameters of the ajax request, the result does not work this time.
After observing the result of
This article mainly introduced the YII2 framework data validation operation, combined with the case form detailed analysis the YII framework common data validation operation principle, the realization method and the related operation skill, the need friend can refer to the next
The examples in this paper describe the YII2 framework data validation operation. Sha
See:Verification example: http://www.position-relative.net/creation/formValidator/Official Address: http://www.position-absolute.com/articles/jquery-form-validator-because-form-validation-is-a-mess/This plug-in supports most browsers. However, due to the use of css3 shadow and rounded corner styles, corner and shadow effects cannot be seen in IE (IE 9 supports ro
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.