mail-phone-regx.js 734 Bytes
/**
 * 国家区号Map手机号码以及邮箱验证正则
 * @author: xuqi<qi.xu@yoho.cn>
 * @date: 2015/12/11
 */

var countryPhoneRegx = {
    '+86': /^1[35847]{1}[0-9]{9}$/,
    '+852': /^[965]{1}[0-9]{7}$/,
    '+853': /^[0-9]{8}$/,
    '+886': /^[0-9]{10}$/,
    '+65': /^[98]{1}[0-9]{7}$/,
    '+60': /^1[1234679]{1}[0-9]{8}$/,
    '+1': /^[0-9]{10}$/,
    '+82': /^01[0-9]{9}$/,
    '+44': /^7[789]{1}[0-9]{8}$/,
    '+81': /^0[9|8|7][0-9]{9}$/,
    '+61': /^[0-9]{11}$/
};

var emailRegx = /^[.\-_a-zA-Z0-9]+@[\-_a-zA-Z0-9]+\.[a-zA-Z0-9]/;

var pwdValidateRegx = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/;

exports.phoneRegx = countryPhoneRegx;

exports.emailRegx = emailRegx;

exports.pwdValidateRegx = pwdValidateRegx;