Browse Source

手机号验证添加14号段

徐滕 2 tuần trước cách đây
mục cha
commit
4c54ef379d
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/utils/validateXG.js

+ 1 - 1
src/utils/validateXG.js

@@ -24,7 +24,7 @@ export function isPhone (str) {
  * @returns {boolean}
  */
 export function isPhoneOrMobile (str) {
-  const phone = /(^(\d{3,4}-)?\d{6,8}$)|(^(\d{3,4}-)?\d{6,8}(-\d{1,5})?$)|(^(((13[0-9]{1})|14[0-9]{1})|(15[0-9]{1})|(16[0-9]{1})|(18[0-9]{1})|(17[0-9]{1})|(19[0-9]{1}))+\d{8})$)/
+  const phone = /(^(\d{3,4}-)?\d{6,8}$)|(^(\d{3,4}-)?\d{6,8}(-\d{1,5})?$)|(^(((13[0-9]{1})|(14[0-9]{1})|(15[0-9]{1})|(16[0-9]{1})|(18[0-9]{1})|(17[0-9]{1})|(19[0-9]{1}))+\d{8})$)/
   return phone.test(str)
 }