mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 03:22:56 +08:00
perf: 用户密码校验规则
This commit is contained in:
parent
eae69aabad
commit
4a09187e83
@ -22,7 +22,7 @@ const validatePwd = (_: any, value: any, callback: any) => {
|
||||
callback(new Error(t('system.be_the_same')))
|
||||
}
|
||||
const pattern =
|
||||
/^.*(?=.{8,20})(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[~!@#$%^&*()_+\-\={}|":<>?`[\];',.\/])[a-zA-Z0-9~!@#$%^&*()_+\-\={}|":<>?`[\];',.\/]*$/
|
||||
/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[~!@#$%^&*()_+\-\={}|":<>?`[\];',.\/])[a-zA-Z0-9~!@#$%^&*()_+\-\={}|":<>?`[\];',.\/]{8,20}$/
|
||||
const regep = new RegExp(pattern)
|
||||
if (!regep.test(value)) {
|
||||
const msg = t('user.pwd_pattern_error')
|
||||
|
Loading…
Reference in New Issue
Block a user