bug: 只要是输入了@就会有提示信息

This commit is contained in:
fanlin
2021-07-26 09:37:19 +08:00
parent dc836ba7c5
commit 13b8619545
+3 -2
View File
@@ -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()