feat:限制模块名称规则

This commit is contained in:
JaguarJack
2023-06-07 09:28:30 +08:00
parent 66f19d8ef1
commit a36fa86d8d
3 changed files with 11 additions and 20 deletions

View File

@@ -22,6 +22,16 @@
required: true,
message: '模块名称必须填写',
},
{
validator: (rule: any, value: any, callback: any) => {
if (! /^[A-Za-z]+$/.test(value)) {
callback('模块名称只允许大小字母组合')
} else {
callback()
}
},
trigger: 'blur',
},
]"
>
<el-input v-model="formData.title" />