0
点赞
收藏
分享

微信扫一扫

test检测字符串是否符合正则表达式

this.mobile = '12345678910';

var reg = /^1[0-9]{10}$/;
reg.test(mobile);//手机号格式正确返回true否则返回false


举报

相关推荐

0 条评论