This article mainly introduces the jQueryValidate form verification plug-in. you can add verification rules in the class attribute for simple verification. if you are interested, refer to the examples in this article to introduce the jQuery Validate form verification plug-in, add verification in the form of class attributes for your reference. The details are as follows:
The effect is as follows:
I. jQuery
If you want to update the validation plug-in, make sure that you update the validation plug-in to version 1.5.1 at the same time. It is compatible with both version 1.2.6 and 1.3. Major updates include:1. Use the validhandler parameter to replace a form event that must be bound to useless before, the specific demo can access marketo (http://jquery.bassistance.de/validate/demo/marketo)2. Add tiny MCE, sample
1. Introduction of jquery Plugin (jquery dependent)
2. Define the validation rulesThe key is the name of the label$ (function () {$ ("#myform"). Validate ({rules:{"username": {"required": true, "Checkusername":true},3. Define error label StyleThe plugin automatically finds the first tag that matches the name= "xxx" and adds an error tag after it (c
Oh, think a long time did not write a blog, are busy with the company's ERP system, which is correct, because this is the real job.Today I want to write a bit in an MVC application, using jquery to verify. Before you go back to the "MVC member registration" Http://www.cnblogs.com/insus/p/3439599.html Here are some problems need to be corrected, such as password text box, you need to change type= "text" to Type= " Password ", so when you enter a passwo
Let jquery validation plugin support zepto
I have been working on mobile terminals for almost a year. I have been entangled in whether to use zepto or jquery on mobile terminals. I am always inclined to use zepto on mobile terminals, but there are too few plug-ins on zepto, to enable the jquery plug-in to support zepto
Defining Chinese messagesvar cnmsg = {Required: "Required field",Remote: "Please fix this field",Email: "Please enter the correct format of e-mail",URL: "Please enter a valid URL",Date: "Please enter a valid date",Dateiso: "Please enter a valid date (ISO).",Number: "Please enter a valid digit",Digits: "Can only enter integers",CreditCard: "Please enter a valid credit card number",Equalto: "Please enter the same value again",Accept: "Please enter a string with a valid suffix name",Maxlength:jQuer
Mobile phone number verified by Jquery Validation plug-inJQuery Validate plug-in Introduction
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 met
Mobile phone number verified by Jquery Validation plug-in, jqueryvalidationJQuery Validate plug-in Introduction
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 usefu
rewrite the defaults with $.fn.validatebox.defaults .
Usage
Copy Code code as follows:
Copy Code code as follows:
$ (' #vv '). Validatebox ({
Required:true
});
Validation rules
Validation rules are defined by using the required and Validtype attributes, and here are the rules that have been implemented:
Email: matching email
This period of time to work more idle, the total feeling can not let their technology deserted, so again the old line, do a small demo to.
This time I made a JS version of the form verification plug-in, the overall principle of reference to the jquery validate, but in some small areas still have their own innovation.
The main features of this plugin are the following.
1. Validation Rule customizationYou
Question about the Chinese version of Remote verification in JQuery's Validation plug-in
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 fiddler for multiple times and finding it invalid, I had to open jquery. validation. webp
Key Features:
Validation of all data before form submission, non-conformance to commit (validate)
If the form check does not pass, auto focus to the first wrong domain
Automatically display error message after control
Support for checksum based on name and Class (Rule,addclassrules)
Remote check-in support (remotes)
Easy to scale: Easily customize validation rules and prompts (Addmethod)
If you are going to update, make sure that you also update the validation plugin validation Plugin to version 1.5.1, which is compatible with both 1.2.6 and 1.3 versions. The main updates include:1. Use Validhandler parameter to replace must bind useless form event before, concrete demo can visit Marketo (http://jquery.bassistance.de/validate/demo/marketo/)2. Add Tiny MCE, sample demo (HTTP://JQUERY.BASSIST
I'm using JQuery Validation plugin-v1.11.1, and the message tip is modified to div:, with the modified code:1, modify the Unhighlight method:Unhighlight:function (E, I, s) {"Radio" = = = E.type? This.findbyname (e.name). Removeclass (i). AddClass (s): t (e). Removeclass (i). addclass (s);if ($ ("[for= '" + e.id + "']") $ (E). Hasclass ("valid")) {$ ("[for= '" + e.id + "']"). Hide ();}}2, add to get absolut
This article is a basic article about the use of jquery to validate input and some common validation rules for beginners.Suppose we have such a form in our web page:1. Verify that the user input can only be in English and numbers:$ ("#btn"). Click (function () {var $aijquery =$ ("#aijquery"), if (!/^[a-z0-9]+$/ig.test ($aijquery. Val ())) {Alert (" Only numbers and English ");});2. Verify that the user inpu
Support zepto and jqueryzepto for jquery validation plugin
I have been working on mobile terminals for almost a year. I have been entangled in whether to use zepto or jquery on mobile terminals. I am always inclined to use zepto on mobile terminals, but there are too few plug-ins on zepto, to enable the jquery plug-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.