rules: [
{required: true, message: '请输入姓名'},
{max: 16, message: '姓名过长'},
{ validator: (rule, val, callback) => {
var pattern = new RegExp("[`~!@#$^&*()=|{}':;',\[\].<>《》/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]");
if (pattern.test(val)){
callback('不可输入特殊字符');
}else {
callback();
}
callback();
},
},
],