JavaScript Mobile number Verification Tool class Phoneutils detailed

Source: Internet
Author: User

The example of this article for everyone to share the JavaScript mobile phone number Verification Tool class Phoneutils specific code, for your reference, the specific content as follows

Phoneutils namespace phoneutils = {phoneregexs: {//China Telecom number segment China_telecom_pattern:/^ (?: \ +86)? 1 (?: 33|53|7[37]|8[019]) \d{8}$|^ (?: \ +86) 1700\d{7}$/,//China Unicom number segment China_unicom_pattern:/^ (?: \ +86)? 1 (?: 3[0-2]|4[5]|5[56]|7[56]|8[56]) \d{8}$|^ (?: \ +86) 170[7-9]\d{7}$/,//China Mobile number segment China_mobile_pattern:/^ (?: \ +86)? 1 (?: 3[4-9]|4[7]|5[0-27-9]|7[8]|8[2-478]) \d{8}$|^ (?: \ +86) 1705\d{7}$/,//Telephone landline number segment Phone_call_pattern:/^ (?: \ d3,4|\d{3,4}-)? \d{7,8} (?:-\ d{1,4})? $/,//Mobile number Phone_pattern:/^ (?: \ +86)? (?: 13\d|14[57]|15[0-35-9]|17[35-8]|18\d) \d{8}$|^ (?: \ +86) 170[057-9]\d{7}$/,//Mobile phone number simple check, not according to carrier classification Phone_simple_pattern:/^ (?: \  +86)? 1\d{10}$/},//Phone number isphonecallnum:function (input) {return this.phoneRegexs.PHONE_CALL_PATTERN.test (input);  },//Telecom mobile number ischinatelecomphonenum:function (input) {return this.phoneRegexs.CHINA_TELECOM_PATTERN.test (input);  },//China Unicom ischinaunicomphonenum:function (input) {return this.phoneRegexs.CHINA_UNICOM_PATTERN.test (input); },//China Mobile IschinamObilephonenum:function (Input) {return this.phoneRegexs.CHINA_MOBILE_PATTERN.test (input);  },//Mobile number isphonenum:function (input) {return this.phoneRegexs.PHONE_PATTERN.test (input);  },//mobile number simple check, only check the length isphonenumbysize:function (input) {return this.phoneRegexs.PHONE_SIMPLE_PATTERN.test (input);  } };

More about Python in http://www.cnblogs.com/yoyonow/,

JavaScript Mobile number Verification Tool class Phoneutils detailed

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.