手机号校验

cyl/master-apply
wangxia 2 months ago
parent c9b2e9e236
commit 0e9f3cfb99

@ -1101,7 +1101,7 @@ let data = {
*/
setReg ($str, $type = 'default') {
if ($type == 'tel') {
return /^[1][3,4,5,7,8,9][0-9]{9}$/.test($str);
return /^1[3-9]\d{9}$/.test($str);
}
if ($type == 'idcard') {
return /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test($str);

Loading…
Cancel
Save