Regular verification phone number, etc.

Source: Internet
Author: User

Whether the checksum is all made up of numbers var patrn=/^[0-9]{1,20}$/;
Check login name: Only 5-20 entries begin with a letter, can be numbered, "_", "." The string var patrn=/^[a-za-z]{1} ([a-za-z0-9]|[. _]) {4,19}$/;
Verify user name: Only 1-30 strings beginning with a letter can be entered var patrn=/^[a-za-z]{1,30}$/;
Check password: Only 6-20 letters, numbers, underscores can be entered var patrn=/^ (\w) {6,20}$/;
Check the ordinary telephone, fax number: Can "+" start, in addition to the number, can contain "-" var patrn=/^[+]{0,1} (\d) {1,3}[]? ([-]? ((\d) | []) {1,12}) +$/;
Check mobile phone Number: Must start with a number, except the number, can contain "-" var patrn=/^[+]{0,1} (\d) {1,3}[]? ([-]? ((\d) | []) {1,12}) +$/;
//check zip code   var patrn=/^[a-za-z0-9]{3,12}$/;
//check search keywords   var patrn=/^[^ ' [email protected]#$%^&* ( ) +=|\\\][\]\{\}:; ' \,.<>/?] {1} [^ ' [email protected]$%^& () +=|\\\] [\]\{\}:;‘ \,.<>?] {0,19}$/;
//email address
//URL&NBSP; " ^[a-za-z]+://(file://w+ (-//w+) *) ( //. (//w+ (-//w+) *)) * (//?//s*)? $ "
//contacts are 2-20 characters, and cannot contain special characters! /^[a-za-z0-9_\u4e00-\u9fa5]{1,19}$/
//can only include Chinese characters, English letters, numbers, and underscores /^[\U0391-\UFFE5\W]$/&NBSP;
Only for Chinese [\u0391-\uffe5]
Domestic phone number, format: 0832-4405222 or 021-87888822 /^\d{3,4}-?\d{7,9}$/

Regular verification phone number, etc.

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.