1、身份证校验规则
isIdCard:function(value) {
return /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(value);
},
2、手机号校验规则
isMobile: function(value) {
return /^1[34578]\d{9}$/.test(value);
},
标签:function,常用,return,校验,value,正则,test
From: https://www.cnblogs.com/Sultan-ST/p/16805209.html