Deep Learning about jQuery Validate form verification, jqueryvalidate
This article introduces jQuery Validate form verification, mainly by using jquery. metadata. js directly writes verification rules in the class attribute and defines the error message. The content is as fo
Jquery. Validate. js Form validation this article is transferred from: http://hi.baidu.com/greenandcoffee/blog/item/5ebe5850e2cfbb551138c24d.html
I. PrerequisitesHttp://bassistance.de/jquery-plugins/jquery-plugin-validation/API: http://jquery.bassistance.de/api-browser/plugins.htmlCurrent version: 1.5.5Jquery
This example describes the jquery validate plug-in functionality and usage. Share to everyone for your reference, specific as follows:
Preface: to form the content format verification, the original JS writing, more cumbersome, the author once wrote a registration interface, verify the mailbox format, user name format, password format, many use the regular, and error message should also use display:none/dis
JQuery Validate W3C content, jqueryvalidateImport js Library
Default verification rules
Serial number
Rules
Description
1
Required: true
Required Fields.
2
Remote: "check. php"
Use the ajax method to call check. php to verify the input value.
3
Email: true
You
JQuery. Validate verification Library1. Download jquery. validate, here I provide jquery-validation-1.9.0, click to download
Default verification rules
Copy codeThe Code is as follows: (1) required: true mandatory field
(2) remote: "check. php" uses ajax to call check. php t
I have reprinted an article written by my predecessors and modified it for record only.First paste the code of a major Chinese company:Copy codeThe Code is as follows: I started from this example. In fact, this example almost contains the essence of jquery. validate. js. If you fully understand this code, it is basically an entry point.I think that when I used to simulate futures web pages online, I wrote m
In the previous article, we used jquery. in validate for client verification (intermediate-level), I introduced jquery. which problems and solutions will validate encounter during daily use? Today's advanced article mainly focuses on jquery. some advanced applications of
The jQuery Validate Form Verification plug-in adds the class attribute Form validation, jqueryvalidate
This article introduces the jQuery Validate Form Verification plug-in, and adds the class attribute Form Verification for your reference. The details are as follows:The effect is as follows:
I.
example:Copy codeThe Code is as follows:Meta: "validate" There is another way:Copy codeThe Code is as follows:$. Metadata. setType ("attr", "validate"); in this way, you can use validate = "{required: true}", or class = "required", but class = "{required: true, minlength: 5} "will not work 2. write the validation rule to the code$ (). Ready (function (){$ ("# Si
Detailed description of the jQuery validation plug-in Validate, jqueryvalidate
The most common use of JavaScript is form verification. jQuery, as an excellent JavaScript library, also provides an excellent form verification plug-in-Validation. Validation is one of the oldest jQuery plug-ins. It has been verified by dif
See http://docs.jquery.com/plugins/validationand sort out
Jquery. validate. JS is a verification framework of jquery. With the advantages of jquery, we can quickly verify some common input, expand our own verification methods, and provide good support for internationalizati
Today, we found that jquery still has the jquery validate feature, which can be used to verify the form. Below is a review and summary:
1. Use jqueryvalidate. js.
Http://bassistance.de/jquery-plugins/jquery-plugin-validation/
2. Example
Note: Adding required to the class
Use jquery. validate, jqueryvalidate
Introduction to jquery. validateI haven't written JavaScript for several years, and the data is slowly organized and the format is also messy.Mainly divided into several partsJquery. validate basic usageJquery. validate API descriptionJqu
,
Email:true
},
Birthday: ' Date '
}
});//end Validate ()
Original: www.uphtm.com
If you also want the birthday field to be required, you can adjust the code as follows:
$ (' #signup '). Validate ({
rules:{
Name: ' Required ',
email:{
Required:true,
Email:true
},
birthday:{
Date:true,
Requi
Default category: 20:35:01 read 123 comments 0 font size: large, medium, and smallJquery. validate is a verification framework of jquery. With the advantages of jquery, we can quickly verify some common input and expand our own verification methods, it also provides good support for internationalization.Note:
value must be the same as #field.
11
Accept
Enter a string with a valid suffix name (the suffix of the upload file).
12
Maxlength:5
Enter a string with a maximum length of 5 (Chinese characters are counted as one character).
13
Minlength:10
Enter a string with a minimum length of 10 (Chinese characters are counted as one character).
14
RANGELENGTH:[5,10]
Enter a string that must be between 5 and 10 (
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
corresponding class name "Tip" in the plug-in);
2. The form element validation passes the success information (in the plug-in corresponding class name "valid");
3. Error message for form element validation failure (corresponding class name "error" in the plug-in).
Without any plug-ins, we need to spend a lot of time writing different kinds of informational hints, thinking about switching back and forth between styles, and writing some basic validation rules. Saying: "I see farther, because I
Jquery validate details 1 JQuery Verification1. 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
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.