JQuery Validate plug-in, jqueryvalidateJQuery Validate
The jQuery Validate plug-in provides powerful form verification functions to simplify form verification on the client side. It also provides a large number of custom options to meet various application needs.
1. First, if we do not have jquery. validata. js, We need to download it. Click the godsend download
Although the validation form is bound when the page is ready, there is still no validation after clicking the Submit button.Then add a word to the Click event of the Submit button:1$ (document). Ready (function () {2 3 //Plus validation effects for adding a product's Table4$ (' #form-product-add '). Bootstrapvalidator ();5 //$ (' #form-product-add '). Data (' Bootstrapvalidator '). Validate (); The Submit button is Sumbit6 //$ (' #form
Both xheditor and validate are excellent jquery plug-ins, but they are combined. If the initialization order is incorrect, some subtle results will appear. I used these two plug-ins at the same time when I made a text submission page. One is used to display the rich text editor, the other is used to verify whether the user entered the content, and my Initialization
CodeAs follows:
Copy codeThe Code is as follows: $ ("# form1").
Both xheditor and validate are excellent jQuery plug-ins, but they are combined. If the initialization order is incorrect, some subtle results will appear. I used these two plug-ins at the same time when I made a text submission page. One is used to display the Rich Text Editor and the other is used to verify whether the user entered the content. My initialization code is as follows:Copy codeThe Code is as follows:$ ("# Form1").
Jquery Validate related parameters and common custom validation rulesFirst, the official website address: http://bassistance.de/jquery-plugins/jquery-plugin-validationSecond, the default check rule(1), Required:true must lose field (2), Remote: "remote-valid.jsp" using Ajax method call remote-valid.jsp Validation input value (3), Email:true Must enter the correct format of e-mail (4), Url:true must e
The JQuery Validate plugin provides a powerful validation feature for forms, making it easier to validate client forms, while providing a number of customization options to meet the needs of your application. The plugin bundles a set of useful validation methods, including URL and email validation, and provides an API to write user-defined methods.The implementation steps are as follows:Step1: Add a form la
Validate the legality of the data in a "Regular Expression object" in ASP
When we make a website, especially a variety of e-commerce sites, first of all, we will allow users to fill out a number of forms to obtain registered users of various information, because users can enter a wide range of information, and some do not meet the requirements of the data will give our back-end ASP processing process unnecessary trouble, Even caused some security prob
First of all, put together a matching environment:
Configuration:Eclipse4.3.2Jdk1.7_45Mysql 5.0+
And then cut to the chase:1, login.jspThe main use of the OGNL tag is also to use the HTML form form, call the Loginaction.action, and post the transmission.After the loginaaction is judged, then there is a hint that needs to be used
2, Struts.xml Configurationnamespace is "/", Inherit "Struts-default"Login successful, then jump to index.jspLogin failed, return login.jsp
Using jquery's validate plug-in to do client-side validation is handy, and here's an example of using the Validate plug-in to authenticate user registration information.
This example uses the 1.5 version .
The example is done under SSH with the following code:
registe.jsp
Main methods of background Registeaction.java
Public String Execute () throws Exception {Map session = Actioncontext.
Using ASP technology to validate user's password in homepage
----know that in a typical Web site, the user's access is unrestricted, that is, any information on the Web site can be accessed, and the order in which the information is accessed is unrestricted.
Take http://www.xyz.com as an example, the user can access the http://www.xyz.comand can access http://www.xyz.com/custom.htm. There is no restriction on the order of the two-page access, that is,
1. Button type Type= "Submit"2.form action cannot be written, otherwise the form is submitted by default and no more Ajax is executedThe 3.ajax method is written in the Submithandler method.For example:Validate setting Default parameters:/** Form Validation* */if ($ ('. Form-validate '). Length > 0) {JQuery.validator.setDefaults ({Ignore: "",Errorelement: ' Span ',Errorclass: ' Help-block error ',Errorplacement:function (Error, Element) {Element.paren
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. metadata. js and write the validation rules in the control.
3. You need to rewrite the method used to trigger verification.
$("#commentForm
Preface : After a series of investigation, finally clarified the jqgrid of the validate of the remote usage, very powerful, and very convenient, below some summaryStep one: Prepare the material jquery.validate.js and load it into your projectThe second step: First look at the remote source code, you will understand a lot, I was through the Firebug investigation to find out, the key points of the comments written outHttp://docs.jquery.com/Plugins/Valid
Validate is a good jq plug-in that provides powerful verification functions to simplify form verification on the client. It also provides a large number of custom options to meet various application needs. This plug-in is bundled with a set of useful verification methods, including URL and email verification, and provides an API for Writing user-defined methods. Validate is a good jq plug-in that provides p
Validate is the jquery extension plug-in used for client verification of the B/S structure. Two JS files must be referenced during use, which are:
1. Basic usage: set verification rules through styles
Script Type
=
"
Text/JavaScript
"
>
$ (
Function
() {$ (
"
# Signupform
"
). Validate ();});
//
Verify the selected form
/
SCRIPT>
P
>
Label
Fo
The verification methods of radio, checkbox, and select are not much different from those mentioned above, but the problem is that the error message is displayed after the first element in the same group. The effect is as follows:
The solution to this problem is to specify the error information to a specific location. The parameters of the validate () method can be customized. The sample code is as follows:
View code
Script Type
=
"
Today, I downloaded jquery. validate. js and read the demo provided by jquery. validate. js. Now let's summarize the notes.Jquery. validate. js official website download: http://bassistance.de/jquery-plugins/jquery-plugin-validation/You can download the example program and js script from the above.
Note: I have read the example program. please correct me if there
This article mainly introduces how to use jquery. the validate custom method implements the logic verification of the quot; mobile phone number or fixed phone number quot;, which solves the verification problem that at least one mobile phone number or fixed phone number is entered, I would like to share with you the following requirement during recent project development: "Enter at least one mobile phone number or fixed phone number", as shown in:
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.