//手机号验证
rules:{
phone: [
{ required: true, min: 11, max: 11, message: "请输入11位手机号码", trigger: "blur" },
{
pattern: /^1[3456789]\d{9}$/,
message: "请输入正确的手机号码"
}
]
}
//座机号 + 手机号验证
rules:{
companyPhone:[
{ required: true, min: 11, max: 12, message: "请输入正确号码", trigger: "blur" },
{
pattern: /^((0\d{2,3}-\d{7,8})|(1[3456789]\d{9}))$/,
message: "请输入正确的号码"
}
]
}
标签:11,手机号,3456789,表单,ui,message,element,输入
From: https://blog.51cto.com/u_15978456/6188342