.
Creditcard:true
You must enter a valid credit card number
Equalto: "#field"
The input value must be the same as #field
Accept
Enter a string with a valid suffix name (the suffix of the upload file).
Maxlength:5
Enter a string with a maximum length of 5 (Chinese characters are counted as one character).
Minlength:10
Enter a string with a minimum length of 1
JQuery validate before using the preparation, need to download the corresponding JS include: 1, Jquery.validate.min.js. 2, Additional-methods.min.js.Of course an essential JS jquery file.The introduction of the above JS began to use, JV (jquery validate hereinafter called JV
This article introduces the jquery plug-in validate to implement the custom checksum result style detailed code, shares for everybody reference, the concrete content is as follows
The effect is as follows:
Specific steps:
1, the introduction of the dependency package
2, add error style
Em.error {
Background:url ("images/unchecked.gif") no-repeat 0px 0px;
padding-left:16px;
}
1. Introduction of js,css:http://plugins.jquery.com/validate/ 2. Set the validation rule: the class of input adds the following properties 3. Set a message that does not conform to the rule: Add data-msg-xxx (XXX is the following attribute)
Required: "Required field",Remote: "Please fix this field",Email: "Please enter the correct format of e-mail",URL: "Pl
Problems encountered when using jquery. validate
This article mainly introduces jquery. A summary of the solutions to the problems encountered during the use of the validate is really an old saying, the meeting is not difficult, it is not difficult, here to record, there is a need for friends can refer.
Question 1:
?
This article is about PHP form validation corresponding to the Jquery-validate plug-in, has a certain reference value, now share to everyone, the need for friends can refer to
Direct code. If you do not understand the parameters, you can refer to the Jquery-validate plugin
Learning Recommendations:"THINKPHP5 Classic
JQuery. validate does not support solutions in ie8-float leaf 1 and problematic code in ie8
1. The JQuery. validate verification framework is submitted and verified through the form on the page.Whether the tag matches your own rules
1
2
3
4
5
User name:6
789
10
Recently in the end of the interface, has been written form validation! have been writing form validation! Found jquery-validate is really useful ah, today summed up some:(1) Required:true must lose field(2) Remote: "check.php" using Ajax method call check.php Validate input value(3) Email:true must enter the correct f
The most convenient way is to use the jquery Validate plugin Reomte method to determine whether or not the user account is registered by Ajax request when the user registers.Jquery Validate plug-in, call remote method validation arguments, remote usage:in the Validate method, addRemote: "Calibration Method", such as:Re
Jquery. Validate API: jquery_validateapi .rar
Deep Learning about jquery. validatejquery. Validate Chinese API and application example (3) advanced verification Basics
1. Rules for using class verification:
In the class, you can use: required, email, number, URL, date, datei
Basis of jquery validate demo, jqueryvalidate
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. This plug-in is bundled with a set of useful verification methods
In this way, when you click the login button, a small box will pop up on the right side, and the following code error content of jquery extension will be displayed. When the added content is correct, the small box will disappear, and lable will change to error.
$ ("# Form1"). validate ({ErrorPlacement: function (lable, element ){Element. ligerTip ({content: lable.html (), appendIdTo: lable });},Success: fun
Jquery.validate is a validation framework for jquery, with the advantage of jquery, we can quickly verify some of the common input, we can expand our own verification methods, and the internationalization also has a good support
JQuery.validate.js is frequently used in form validation, and is a beginner for remote use.
. Basic explanation
Let me explain the keywords and meanings of the validation form. JQuery. validate comes with: required: "required field", remote: "correct this field", email: "enter an email in the correct format", url: "enter a valid URL", date: "enter a valid date", dateISO: "enter a valid date (ISO ). ", number:" enter a valid numb
Problems encountered when using jquery. validate, jqueryvalidate
Question 1:
After reading the previous articles written by others, it seems that jquery is dependent. metadata. the js library is then written in the form of class = "required email". It seems a bit messy to write, and the class itself is rendered, it
Normal forms are submitted using the Submit button, and the jquery Validate plugin makes it easy to do forms validation.To do a text messaging function, to the target table to insert multiple records, the interface using AJAX to submit the form, waiting for the effect directly with the Ext mask.But how to verify and run into problems.The solution is simple, the form is the same as the normal form, the
Jquery. validate. js multiple names are the same for verification, jqueryvalidatename
1. The introduced plug-in: jquery. validate. js 484th line code comment:
// Select only the first element for each name, and only those with rules specified
// If (this. name in rulesCache |! Validator. objectLength ($ (this). rule
) {The Var reg =/^[a-za-z][a-za-z0-9]{5,14}$/;//has alphanumeric characters and the first character is a letter with a length of 6-15 bitsReturn Value.match (reg) ==null?false:true;}, "This is the user name consisting of consiste default prompt error message");JQuery.validator.addMethod ("Password_consist", function (value, Element) {The Var reg =/^[a-za-z0-9]{6,20}$/;//has alphanumeric characters and the first character is a letter with a length of 6-20Return Value.match (reg) ==null?false:true
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.