From 2e882cbeda6a8a0f4dd193896386192f0f5ba0a7 Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: Thu, 06 Jul 2023 15:52:24 +0800
Subject: [PATCH] 修改
---
src/util/validate.js | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/util/validate.js b/src/util/validate.js
index 3338c7f..60c609b 100644
--- a/src/util/validate.js
+++ b/src/util/validate.js
@@ -215,6 +215,12 @@
else return true;
}
+// 简单校验手机号(十一位数字则通过)
+export function verifySimplePhone(val) {
+ var regex = /^\d{11}$/; // 正则表达式,\d 匹配数字,{11} 表示匹配11次
+ return regex.test(val);
+}
+
/**
* 国内电话号码
* @param val 当前值字符串
--
Gitblit v1.9.2