0
点赞
收藏
分享

微信扫一扫

js正则判断

if(addreferee_no==""||addreferee_no==null){
$.toast({top:"50%", msg: "手机号不能为空", type: "warn", close:3000});
return;
}
var phoneReg = /^((1[0-9][0-9])|(14[5,7])|(17[0,6,7,8])|(19[7]))\d{8}$/;
if(!phoneReg.exec(addreferee_no)){
$.toast({top:"50%", msg: "手机号码格式不正确!", type: "warn", close:3000});
return;
}

举报

相关推荐

0 条评论