Easyui validatebox verification, easyuivalidatebox

Source: Internet
Author: User

Easyui validatebox verification, easyuivalidatebox

<Html xmlns = "http://www.w3.org/1999/xhtml"> 
// Customize validator. js // extended easyui Form Verification $. extend ($. fn. validatebox. defaults. rules, {// verify the Chinese character CHS: {validator: function (value) {return/^ [\ u0391-\ uFFE5] + $ /. test (value) ;}, message: 'Only Chinese characters can be entered '}, // mobile phone number verification mobile: {// value is the value of validator: function (value) in the text box) {var reg =/^ 1 [3 | 4 | 5 | 8 | 9] \ d {9} $/; return reg. test (value) ;}, message: 'The format of the entered mobile phone number is not accurate. '}, // domestic zip code verification zipcode: {validator: function (value) {var reg =/^ [ 1-9] \ d {5} $/; return reg. test (value) ;}, message: 'zip code must be a 6-digit number not starting from 0. '}, // User account Verification (only including _ alphanumeric letters) account: {// param value is [] medium value validator: function (value, param) {if (value. length <param [0] | value. length> param [1]) {$. fn. validatebox. defaults. rules. account. message = 'username length must be in the '+ param [0] +' to '+ param [1] +' range '; return false;} else {if (! /^ [\ W] + $ /. test (value) {$. fn. validatebox. defaults. rules. account. message = 'user name can contain only numbers, letters, and underscores. '; return false;} else {return true ;}}, message :''}})

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.