Commit 784e4348 by 吕明尚

修改标签管理的正则表达式

parent 8e057e3e
...@@ -196,13 +196,13 @@ export default { ...@@ -196,13 +196,13 @@ export default {
rules: { rules: {
name: [ name: [
{required: true, message: '请输入标签名称', trigger: 'change'}, {required: true, message: '请输入标签名称', trigger: 'change'},
//不能输入英文
{pattern: /^[0-9\u4e00-\u9fa5]+$/, message: '不能输入英文', trigger: 'change'},
//不能含有特殊字符 //不能含有特殊字符
{pattern: /^[a-zA-Z0-9\u4e00-\u9fa5]+$/, message: '不能含有特殊字符', trigger: 'change'}, {pattern: /^[a-zA-Z0-9\u4e00-\u9fa5]+$/, message: '不能含有特殊字符', trigger: 'change'},
{min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'change'}, {min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'change'},
//字符串中间不能含有空格 //字符串中间不能含有空格
{pattern: /^\S*$/, message: '字符串中间不能含有空格', trigger: 'change'}, {pattern: /^\S*$/, message: '字符串中间不能含有空格', trigger: 'change'}
//不能输入英文
{pattern: /^[\u4e00-\u9fa5]+$/, message: '不能输入英文', trigger: 'change'}
], ],
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment