正则表达式验证手机号

 var pattern = /^0{0,1}(1[0-9][0-9]|15[7-9]|153|156|18[7-9])[0-9]{8}$/,
	                str = $("#StorePhone").val();               
                    if (!pattern.test(str)) {
                        var msgModel = { MsgType: "warning", msg: "请正确输入手机号!", result: false, msgTitle: "系统提示" };
                        BPM.ShowMsg(msgModel);
                        $("#StorePhone").focus();
                        BPM.unblockUI($("#blockAddDiv")); //解除锁定
                        return false;      
                    }  
验证阿里大小宝卡号也没问题
原文地址:https://www.cnblogs.com/MartinLee/p/7622534.html