elemment-ui的form表单输入框自定义rules限制规则限制输入长度
作者:互联网
rules: [
{ validator: rule.emptySpace, trigger: 'blur' },
{ validator: rule.labelSpace, trigger: 'blur' },
{
required: true,
message: '请输入模型名称',
trigger: 'blur'
},
// 增加长度校验限制,lis 20220802
{ min: 1, max: 10, message: "名称长度在1到20个字符", trigger: "blur" }//这一句
]
标签:自定义,form,rules,rule,trigger,blur,message,validator 来源: https://www.cnblogs.com/lishuang2243/p/16543034.html