Closed webenters closed 7 years ago
var myRules={
phone:{
test:/^1[34578]\d{9}$/,
message:"电话号码格式不正确"
},
max6:{
test:function(val){
if(val.length>6) {
return false
}
return true;
},
message:"最大为6位"
}
}
import Vue from "vue";
import verify from "vue-verify-plugin";
Vue.use(verify,{
rules:myRules
});
我有个需求是在文本框里输入多个邮箱,以逗号分隔,需要验证格式