Commit 0d351ead authored by 崔佳豪's avatar 崔佳豪

fix: 修改默认密码校验提示

parent 42f2ec43
Pipeline #55004 passed with stages
......@@ -101,7 +101,7 @@ const ValidContainer = props => {
},
{
pattern: /^(?![0-9]+$)(?![a-zA-Z]+$)[a-zA-Z0-9!@#$%^&*_]{8,16}$/,
message: '密码字符长度为8-16个字符',
message: '密码字符长度为8-16个数字和字符',
},
({ getFieldValue }) => ({
validator(rule, value) {
......@@ -127,6 +127,10 @@ const ValidContainer = props => {
},
({ getFieldValue }) => ({
validator(rule, value) {
if (!/^(?![0-9]+$)(?![a-zA-Z]+$)[a-zA-Z0-9!@#$%^&*_]{8,16}$/.test(value))
return Promise.reject('密码字符长度为8-16个数字和字符');
if (value === `${infoPre}${props?.global?.userInfo?.loginName ?? info}` || value === 'panda666')
return Promise.reject('密码规则不允许');
if (!value || getFieldValue('newPwd') === value) {
return Promise.resolve();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment