法规库-编辑-标准编号添加;;特殊字符
This commit is contained in:
@@ -32,6 +32,16 @@ export default {
|
|||||||
callback()
|
callback()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
validateStandardItem2 (rule, value, callback) {
|
||||||
|
// return callback()
|
||||||
|
let testval = /^[A-Za-z0-9/]+$/
|
||||||
|
let testval1 = /[.-;;]+/
|
||||||
|
if (value && !value.match(testval) && !value.match(testval1)) {
|
||||||
|
return callback(new Error('只能为(字母、数字、.、-、;、;)'))
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 验证字母、数字、.、-的正则且不能重复
|
* 验证字母、数字、.、-的正则且不能重复
|
||||||
|
|||||||
@@ -2844,7 +2844,7 @@ export default {
|
|||||||
standNumber: [
|
standNumber: [
|
||||||
{required: true, type: 'string', message: '标准编号不能为空', trigger: 'change'},
|
{required: true, type: 'string', message: '标准编号不能为空', trigger: 'change'},
|
||||||
{type: 'string', max: 100, message: '标准编号不能超过100个字符', trigger: 'change'},
|
{type: 'string', max: 100, message: '标准编号不能超过100个字符', trigger: 'change'},
|
||||||
{type: 'string', validator: this.verify.validateStandardItem, trigger: 'change'}
|
{type: 'string', validator: this.verify.validateStandardItem2, trigger: 'change'}
|
||||||
],
|
],
|
||||||
synopsis: [
|
synopsis: [
|
||||||
{type: 'string', max: 500, message: '文本说明不能超过500个字符', trigger: 'change'}
|
{type: 'string', max: 500, message: '文本说明不能超过500个字符', trigger: 'change'}
|
||||||
|
|||||||
Reference in New Issue
Block a user