First, use before the necessaryOfficial website:http://bassistance.de/jquery-plugins/jquery-plugin-validation/ API: http://jquery.bassistance.de/api-browser/plugins.htmlCurrent version: 1.5.5jquery version required: 1.2.6+, compatible 1.3.2Second, the default checksum rule
(1) Required:true must be lost field
(2) Remote: "check.php" use Ajax method to invo
triggered when the form is submitted
Example: JQuery Submit () methodWhen submitting a form, a warning box is displayed:
$ ("form"). Submit (function () {
alert ("submitted");
});
Definitions and usageThe Submit event occurs when the form is submitted.This event applies only to The submit () method triggers a Submit event, or a function that runs when a submit event occurs.Grammarto trigger
Jquery validation has been used for validation in recent projects. It works well with bootstrap and jquery form. However, the caching problem of remote verification has left me a headache for a long time, almost like dropping this plug-in.Example:Existing school, grade, and class entityThere cannot be the same grade in
such as the following error:Solutions such as the following:Method One:Found in WebconfigDelete Assuming there are no above two sentences: Add in appsettings bytesSuch a sentence will be OK.Method Two:1. Create a new Scripts folder under the site root folder, add Jquery-1.7.2.min.js and Jquery-1.7.2.js to the inside (depending on the version number you need to use),2. Add the Global Application class Global
). Length;return len >= param[0] len Custom validation rulesIt is best not to add a new validation rule in the Easyui source file, the first is to avoid the misuse of the Easyui source of pollution, more importantly, considering the easy component upgrade in the future. So the most logical way is to write your own extension files separately.For example: I have
However, the strange thing is that it seems a little strange recently, because it seems a little rigid, the strain capability of existing functions is not strong, and there is even a strange bug. It is actually normal for any project to have a bug, but this bug is actually recorded in a document, but it has not been implemented, which is a bit difficult to say. This problem occurs in the remote verification method, but it is easy to modify it. Record it here for future reference.
In form verific
jquery simple Form Validation effect:As long as there is a form of the place, basic will have form validation, the following is a combination of examples of the simplest form validation, how to prevent the filling of the form content is empty.The code example is as follows:D
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 format of e-mail(4) Url:true must enter the co
This example describes the jquery form validation feature. Share to everyone for your reference. Specifically as follows:
This is the form validation effect that is implemented using jquery, the Ajax way to verify that your form is filled out correctly, if the
The previous article introduced the basics of the introduction of jquery validate form validation, detailed in the jquery validate form validation Primer, today's article delves into jquery Validate form verification, the following are the full contents of the article:
1, i
See the jquery verification framework, in the use of the time, in fact, is still very dizzy, very troublesome, the use of the time code is not concise, so have to get a own jquery verification framework of the plan, the basic principle is to input, select, textarea these three types of control to do calibration, Define a custom attribute inside as a test. In addition, the use of JS to do i18n internationali
Validationengine gives us a lot of work to do with the form validation for the front end. In most cases we use validationengine to validate forms in several ways:
1 Use a normal form submission. This situation validationengine validation does not commit the form.
2 submitting the form using AJAX, but not using AJAX validation.
This approach is also relatively
Cross-validation
method thought:
Crossvalidator divides the dataset into several subsets for training and testing respectively. When K=3, Crossvalidator produces 3 training data and test data pairs, each data is trained with 2/3 of the data, and 1/3 of the data is tested. For a specific set of parameter tables, Crossvalidator calculates the average of the evaluation criteria for the training model based on three sets of different training data and tes
Take the following text box as an example,typeid= "username"/>We want this text box to enter only numbers, then the corresponding rules should be set Username:number,However, when the user does something, we do not need this validation rule, the specific implementation is as follows:First, regardless of whether the validation needs to be canceled, we add it to th
Validation is a very powerful plug-in written by jquery's certificate users. Its functions are not enough. It is also very informative and can be customized to many things, in this case, seven callback requests are introduced, making it easier to use validation.
Version
Jquery: 1.4.2
Validation: 1.7
Resource
validate, so it is foolproof! For example, for example, to do a right-click on a row of data click on the selection of new features, then the new method in the beginning should be added to the $ (' #tt '). Form (' disablevalidation '), so as to ensure that click on the new, The dialog does not immediately load the verification information, that is, the validation
: {
validator:function ( Value, param) {
var len = $.trim (value). length;
Return len >= param[0] len
Custom CHECKSUM Rules
It is best not to add a new checksum rule in the Easyui source file, the first is to avoid the misuse caused by the pollution of the Easyui source code, more importantly, considering the future component upgrades easily. So the most reasonable way is to write your own extension file alone.
For example: I added th
If you need to modify these hints, you can add any information prompts that you want to display in the JS code.We use the most common forms of registration verification as an example to illustrate:First, you have a form, and you define the ID of the form.
Then introduce the following four JS files:
Then customize a JS file, the contents of this JS file are as follows:$ ("#login"). Validate ({Rules: {Username: {Required:true,Minlength:2},Ema
Small series of Internet access to a lot of articles on the jquery.validate, the big department just introduced its API and usage, not a detailed introduction to the case, research for half a day or not. To this end, the small make up a jquery validate.js form verification Getting started instance, write is not particularly good, but should apply to beginners, share to everyone.
The following is the Validate.js form verification Getting Started ins
Verify that the Red submit button is displayed
Bindblur:function () {//jquery multilevel authentication form
var n = $ (' #item_name ');
var p = $ (' #price ');
var r = $ (' #reserve ');
Show (Velidate ())//page load after the first validation
//Three need to verify the validation of the binding field, here can also be written as a code
//$ ('
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.