From 13b861954550d1ff94168b7ef108a6272966c3fc Mon Sep 17 00:00:00 2001 From: fanlin Date: Mon, 26 Jul 2021 09:37:19 +0800 Subject: [PATCH] =?UTF-8?q?bug=EF=BC=9A=20=E5=8F=AA=E8=A6=81=E6=98=AF?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E4=BA=86@=E5=B0=B1=E4=BC=9A=E6=9C=89?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/verify/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/verify/index.js b/src/common/verify/index.js index 6692dd5b2..b217a4af9 100644 --- a/src/common/verify/index.js +++ b/src/common/verify/index.js @@ -24,8 +24,9 @@ export default { * */ validateStandardItem (rule, value, callback) { // return callback() - let testval = /^[A-Za-z0-9/ ,.-\\-()()]+$/ - if (value && !value.match(testval)) { + let testval = /^[A-Za-z0-9/]+$/ + let testval1 = /[.-]+/ + if (value && !value.match(testval) && !value.match(testval1)) { return callback(new Error('只能为(字母、数字、.、-)')) } else { callback()