ruleValidate: {
userName: [
{
required: true,
message: "用户名不能为空",
trigger: "blur"
},
{
type: "string",
pattern: /^[0-9a-zA-Z]*$/g,
message: "用户名只能是英文或者数字",
trigger: "blur"
}
],
password: [
{
required: true,
message: "密码不能为空",
trigger: "blur"
}
],
passwordList: [
{
required: true,
message: "密码不能为空",
trigger: "blur"
},
],
roleId: [
{
required: true,
message: "角色不能为空",
trigger: "blur"
}
],
fullName: [
{
required: true,
message: "该项不能为空",
trigger: "change"
},
{
type: "string",
pattern: /\u00A9/,
max: 4,
message: "姓名只能是中文且最大长度不能超过4",
trigger: "blur"
}
],
nickName: [
{ required: true, message: "昵称不能为空", trigger: "change" }
],
sex: [
{
required: true,
type: "number",
message: "性别不能为空",
trigger: "blur"
}
],
age: [
{
required: true,
type: "string",
message: "年龄不能为空",
trigger: "blur"
},
{
type: "string",
pattern: /^\d{n,}$/,
max: 3,
message: "年龄只能为数字且不能超超过3位数",
trigger: "blur"
}
],
mobileNum: [
{
required: true,
type: "string",
message: "手机号不能为空",
trigger: "blur"
},
{
type: "string",
pattern: /^[1][3,4,5,7,8][0-9]{9}$/,
message: "不符合手机号码规则",
trigger: "blur"
}
],
jobTitle: [
{
required: true,
message: "职务不能为空",
trigger: "blur"
}
],
status: [
{
required: true,
message: "状态不能为空",
trigger: "blur"
}
]
},