Jquery formvalidator Form Verification plug-in 2.9.3 supports verification of all client controls

Source: Internet
Author: User
Released to the original articleArticleIt's up.
Http://www.cnblogs.com/wzmaodong/archive/2008/01/11/1034901.html

The new version will be released after playing badminton in the evening!
Http://www.yhuan.com/formvalidator/index.html
Main content of this update
1. Added support for select-multiple verification,So far, the plug-in has supported verification of all controls.
Use inputvalidator to verify this type

attribute property name default value explanation
type comparison type "size" (invalid for select)
"size": indicates the comparison length
"Number": numeric comparison
"string": Comparison
min minimum length/value 0 default numeric type. If character comparison is performed, please generate the character type
for select-multiple, the min and Max parameters in inputvalidator indicate the number of selected characters
max maximum length/value 99999999999 same as above
onerror error prompt "input error" blank users are not displayed.
onerrormin A prompt that is smaller than the min attribute null error message when the value entered by the user is smaller than the min attribute
onerrormax A prompt with a property greater than Max null error message when the value entered by the user is greater than the max attribute

ExampleCode: For details, see the new example in demo1.
$ ("# Selectmore "). formvalidator ({onshow: "press Ctrl to select multiple", onfocus: "press Ctrl to select multiple, at least two", oncorrect: "Thank you for your cooperation "}). inputvalidator ({min: 2, onerror: "select at least 2 "});

2. Added support for setting multiple default values for the checkbox. For more information, see the code in "select hobby 2" in demo1.
$ ("Input: checkbox [@ name = 'checkbox8']"). formvalidator ({tipid: "test2tip", onshow: "Please select your interests (at least two, up to three)", onfocus: "You should select at least two, you can select up to 3 ", oncorrect:" Congratulations, you have selected ",Defaultvalue: ["7", "8"]}). Inputvalidator ({min: 2, Max: 3, onerror: "The number you selected is incorrect (at least two, up to three )"});
Note that defaultvalue must be an array

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.