Extended Validation of jquery Easyui

Source: Internet
Author: User

1. Extension via $.extends ($.fn.validatebox.defaults.rules,)

       $.extend (                $.fn.validatebox.defaults.rules,                {                    idcard: {//  Verify ID                        function (value) {                            return /^\d{15} (\d{2}[a-za-z0-9])? $/I.test (value);                        },                        ' ID number format incorrect '                    },                })

Calling methods

<class= "Easyui-validatebox"  validtype= "Idcard"> 
Property:

name type Description Default Value
Required (required) Boolean (Boolean) Define form fields that must be filled in. False
Validtype (authentication type) String (String) Define the type of validation for the form field, such as email, URL, etc. Null
Missingmessage (not filled in prompt) String (String) The prompt message that appears when form fields are not filled in. This field is required.
Invalidmessage (Invalid hint) String (String) The prompt that appears when the contents of the form field are validated as invalid. Null

Extended Validation of jquery Easyui

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.