Want to know jquery accordion form with validation example? we have a huge selection of jquery accordion form with validation example information on alibabacloud.com
Earlier I demonstrated the angular form validation example: Angularjs's Form validation example, in fact, we can use angular provided module messages for easier form
WordPress, of course, there are forms of verification, but we all know that the user experience is not good, the page jumps, and sometimes the form will be emptied, and the front desk form certification seems very necessary. The following is my written by changing the text box background color prompts the user input content, WordPress as long as the following code into the JS file can work. The
encountered some problems:
This is how the form started, and the Validtype attribute is written in the Data-options attribute:
Here is a problem: This write Firebug will be an error, because the #snumbers need to be quoted, but direct quotes will be wrong, here is equivalent to Sanchong quotes, the internet to check a lot of information, some with escape, are not workable, I guess here is the problem of EASYUI resolution, Unless you ch
---restore content starts---123456789Ten One Array Letters: A -Data-describedby= "For_word"//where the error message is displayed -Data-description= "AAA"//what to Prompt for theData-required//specify that the form contents cannot be empty -data-pattern= "^[a-za-z]+$" >//validation rules - - + - Enter Number: + AData-describedby= "For_number" atData-description= "BBB" -data-Required -data-pattern= "^\d+$"
HTML section:
jquery section:
Above this jquery simple form verification example is small series share to everybody's content, hope can give everybody a reference, also hope everybody support cloud habitat community.
Easyui The validation box inside the form forms to explain the next Validatebox class and related properties.
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 regular expression rules, system-provide
$ ("#commentForm"). Validate (): On it, what parameters should be added ...
Registration information authentication text message $ (function () {JQuery.validator.addMethod ("IsMobile", function (value, Element) {var length = Val
Ue.length; return this.optional (Element) | | (length = /^ ((13[0-9]{1}) | ( 15[0-9]{1}) | (18[0-9]{1}))
+\D{8}) $/.test (value)); "Please fill in your phone number correctly."
"); Entry into force $ ("#signup-form
//Verify the information for the formvarMessage= "";functionValidate () {varLienceplate = document.getElementById ("Lienceplate");//License plate number varBar_code = document.getElementById ("Bar_code");//Vehicle Barcode varPhoneNumber = document.getElementById ("PhoneNumber");//Telephone varMobile =/^1[3458]\d{9}$/;//Phone number varLienceplatereg =/^[\u4e00-\u9fa5]{1}[a-z]{1}[a-za-z_0-9]{5}$/;//the regular of the car, the letter case can be varBar_codereg =/^[a-z]{2}[0-9]{8}$/;
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.