Discover php validate form data before submit, include the articles, news, trends, analysis and practical advice about php validate form data before submit on alibabacloud.com
Details about the jQuery Form Verification plug-in validate and jqueryvalidate
The validate plug-in is a jquery-based form verification plug-in. There are many common verification methods that we can call directly. Let's take a look at them.
Example:
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:
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
Pre-used JS form to prevent duplicate submission method
The code is as follows
Copy Code
The following three methods are called separately
so if I make a form directly, and then submit it to/test, the above
Default verification rules(1) required: required field for true
(2) Remote: "check. php" uses ajax to call check. php to verify the input value.
(3) Email: true: You must enter an email in the correct format.
(4) URL: True must enter the URL in the
I. PreparationsJQuery version: 1.2.6 +, compatible with 1.3.2
Official website address: http://jqueryvalidation.org/
Ii. Default verification rules(1) required: required field for true(2) remote: "check. php" uses ajax to call check. php to verify
Have seen a lot of various prevention forms repeatedly submitted JS or jquery program, but this is just a simple method, if we do not submit a form from this page, directly find the page to accept the data this JS processing method is invalid, below
Document directory
Get this to work
Customizations
Custom functions call (validate from any function you created)
I want to validate directly from Javascript
Inline Ajax Validation
Ajax submitting
Debug mode
Official Demo:
When it comes
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.