更新 'installer/client/src/core/util/helper/password.ts'

This commit is contained in:
zhongjin 2023-05-05 22:32:29 +08:00
parent e879b0b849
commit d3cfd60b8d

View File

@ -30,14 +30,14 @@ export function checkPassword(password: string): string | boolean {
if (password.length >= 8) {
const pwdLevel = getPassLevel(password);
if (RegExp(/\s/).test(password)) {
return 'Your password should not contain spaces.';
return '密码不能包含有空格.';
}
if (pwdLevel.reduce((acc, curr) => acc + curr, 0) < 4) {
return 'Your password must contain a lower-case letter, an upper-case letter, a digit and a special character. Try a different password';
return '密码必须包含有大小写的组合,至少还要有一个特殊字符';
} else {
return true;
}
} else {
return 'Should have at least 8 characters';
return '至少要有8个字符';
}
}