|
|
|
@ -156,6 +156,7 @@
|
|
|
|
|
} from "element-china-area-data";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
|
|
|
|
|
data() {
|
|
|
|
|
let validatePass2 = (rule, value, callback) => {
|
|
|
|
|
if (value === "") {
|
|
|
|
@ -166,6 +167,17 @@
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
//限制输入字母数字
|
|
|
|
|
const validatePass = (rule, value, callback) => {
|
|
|
|
|
if (
|
|
|
|
|
/^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9]|.*[_.*%@!]).{12,20}$/.test(value) === false
|
|
|
|
|
) {
|
|
|
|
|
callback(new Error("密码需要包含大写字母、小写字符、数字、特殊字符(含_.*%@!)其中任意三种,长度12-20位"));
|
|
|
|
|
} else {
|
|
|
|
|
// 校验通过
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
return {
|
|
|
|
|
inputQuery: {
|
|
|
|
|
password: "",
|
|
|
|
@ -180,7 +192,8 @@
|
|
|
|
|
selectedOptions: [],
|
|
|
|
|
|
|
|
|
|
rules: {
|
|
|
|
|
password: [{required: true, message: "请输入密码", trigger: "blur"}],
|
|
|
|
|
password: [{required: true, message: "请输入密码", trigger: "blur"},
|
|
|
|
|
{ validator: validatePass, trigger: "blur" },],
|
|
|
|
|
|
|
|
|
|
mobile: [{required: true, message: "请输入手机号", trigger: "blur"}],
|
|
|
|
|
confirmPassword: [
|
|
|
|
|