## Elementui form自定义正则 ```javascript businessCertNo: [ { required: true, message: '请输入xxxxxxx', trigger: 'blur' }, { validator: reg_businessCertNo, trigger: 'blur' }, ], export function reg_businessCertNo(rule, value, callback) { if (value === "") { callback(new Error("messge")); } else { var chrnum = /^\w{2,20}$/g; if (!chrnum.test(value)) { callback(new Error("message")); } callback(); } } ```
标签:自定义,form,Elementui,value,callback,businessCertNo From: https://www.cnblogs.com/newBugs/p/16994579.html