提交 1e880ecc 编写于 作者: Mr.奇淼('s avatar Mr.奇淼(

自动化pkg不被允许以数字开头

上级 28eea613
......@@ -68,8 +68,19 @@ const form = ref({
desc: '',
})
const validateNum = (rule, value, callback) => {
if ((/^\d+$/.test(value[0]))) {
callback(new Error('不能够以数字开头'))
} else {
callback()
}
}
const rules = ref({
packageName: [{ required: true, message: '请输入包名', trigger: 'blur' }],
packageName: [
{ required: true, message: '请输入包名', trigger: 'blur' },
{ validator: validateNum, trigger: 'blur' }
],
})
const dialogFormVisible = ref(false)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册