|
|
@ -265,7 +265,28 @@ |
|
|
|
createMessage.warn(t('请输入工号')); |
|
|
|
createMessage.warn(t('请输入工号')); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (!formData.psd) { |
|
|
|
|
|
|
|
createMessage.warn(t('sys.login.passwordPlaceholder')); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//包含字母(大小写)、数字以及特殊字符,并且有一定的长度要求,至少 8 位 |
|
|
|
|
|
|
|
const passwordRegex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?])[A-Za-z\d!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]{8,20}$/; |
|
|
|
|
|
|
|
if (!passwordRegex.test(formData.psd)) { |
|
|
|
|
|
|
|
createMessage.warn(t('sys.login.passwordPlaceholderNotReg')); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// if (!formData.workno) { |
|
|
|
|
|
|
|
// createMessage.warn(t('sys.login.passwordPlaceholder')); |
|
|
|
|
|
|
|
// return; |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
if (!formData.sepsd) { |
|
|
|
|
|
|
|
createMessage.warn(t('sys.login.confirmPassword')); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (formData.psd !== formData.sepsd) { |
|
|
|
|
|
|
|
createMessage.warn(t('sys.login.diffPwd')); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!formData.phone) { |
|
|
|
if (!formData.phone) { |
|
|
|
createMessage.warn(t('请输入电话')); |
|
|
|
createMessage.warn(t('请输入电话')); |
|
|
|