标准编号正则校验

This commit is contained in:
zyn
2023-05-12 11:00:39 +08:00
parent aea33ff4b5
commit dcdfdf279a
+2 -3
View File
@@ -34,9 +34,8 @@ export default {
},
validateStandardItem2 (rule, value, callback) {
// return callback()
let testval = /^[A-Za-z0-9/]+$/
let testval1 = /[.-;()()]+/
if (value && !value.match(testval) && !value.match(testval1)) {
let testval = /^[A-Za-z0-9\/\-.;()()\s]+$/
if (value && !value.match(testval)) {
return callback(new Error('只能为(字母数字()().-;;)'))
} else {
callback()