The JQuery extension Validate-4 sets the error message style. For friends who use Validate, refer. Let's first use firebug to view the html error prompt generated by JS in the previous example:
We found that the error message is put in a label and there is a class style error, as long as it is under the signupform
The error css style in the label should be
1. write the validation rule to the Control lt; scriptsrc quot ;.. /js/jquery. js quot; type quot; text/javascript quot; gt; lt;/script gt; lt; scriptsrc quot ;.. /js/jquery. validate. js quot; type quot 1. write the validation rule to the control.
Function Description:
In the page pop-up form, Ajax no refresh submission form, the form needs to pass validation.
Scope of application:
Applies to new, modified records on the list page.
Need to load the JS file:
Jquery.min.js
Artdialog.js
Iframetools.js
Jquery.form.js
Jquery.validate.js
Realize the idea:
In the page, put the form in a hidden container, pop the form with Artdialog and add jqueryvalidate validation to the form, submit using Jqueryform Ajax submissions, because they ar
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
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
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 must enter an email in the correct format.
4
Url: true
You must enter a UR
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.
better controlTip: We can combine the jquery validate basic validation method http://www.uphtm.com/js/432.html and the advanced authentication methods described here on the same form. For a field that has only one validation rule and error message, you can use the Basic authentication method because it is fast, but uses advanced authentication methods for more complex validation.The HTML for the form in Fi
may wish to take a look at this article.But what do we do with the page that the front desk user registers? This is the main content of this article, we can use jquery Validate plug-in to do registration verification function, jquery I have no system to learn, just use what to learn what, what to understand, so if there is a mistake, please comment ~ Below I ste
Jquery. validate Form Verification plug-in uses the method to parse why jquery validate Form Verification plug-in is used: it is not easy to write a general and powerful jquery Form Verification plug-in. Jquery
Customize the validation behavior of jquery-validate
1: custom form submission
Set submitHandler to customize the form submission action
$ (". Selector"). validate ({
SubmitHandler: function (form) {alert ("verified ");}
});
To submit a form, call
Form. submit (); or $ (form). ajaxSubmit ();
2: debugging mode
Set debug to true, and the form is not submitted
The submitHandler commit of the jQuery validate plug-in leads to an endless loop solution. jqueryvalidate is submitted.
This article describes the solution to the endless loop caused by submitHandler submission of the jQuery validate plug-in. We will share this with you for your reference. The details are as follows:
T
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
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 internationalization.
It's easy to use this function. See the
This example describes the jquery validate plug-in Submithandler commit to a dead loop solution. Share to everyone for your reference, specific as follows:
Dom's submission to the image (Form.submit); and jquery's Submission $ ('). submit (); There is no difference in functionality. But if you use the jquery validate
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
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
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.