|
|
|
@ -235,13 +235,19 @@ |
|
|
|
|
createMessage.warn(t('sys.login.mobilePlaceholder')); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
const phoneRegex = /^1[3-9]\d{9}$/; |
|
|
|
|
if (!phoneRegex.test(formData.mobile)) { |
|
|
|
|
createMessage.warn(t('sys.login.mobilePlaceholderNotReg')); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (!formData.password) { |
|
|
|
|
createMessage.warn(t('sys.login.passwordPlaceholder')); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
const phoneRegex = /^1[3-9]\d{9}$/; |
|
|
|
|
if (!phoneRegex.test(formData.mobile)) { |
|
|
|
|
createMessage.warn(t('sys.login.mobilePlaceholderNotReg')); |
|
|
|
|
//包含字母(大小写)、数字以及特殊字符,并且有一定的长度要求,至少 8 位 |
|
|
|
|
const passwordRegex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@#$%^&+=!])(?=.{8,})$/; |
|
|
|
|
if (!passwordRegex.test(formData.password)) { |
|
|
|
|
createMessage.warn(t('sys.login.passwordPlaceholderNotReg')); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
// if (!formData.workno) { |
|
|
|
|