fix(password-validator): adjust password length validation to include maximum length of 32 characters

This commit is contained in:
Chamika J
2025-08-04 15:23:58 +05:30
parent 136dac17fb
commit 6e37208f62

View File

@@ -8,7 +8,7 @@ import {PASSWORD_POLICY} from "../../shared/constants";
function isStrongPassword(password: string) { function isStrongPassword(password: string) {
if (!isProduction()) return true; if (!isProduction()) return true;
const strength = PasswordStrengthChecker.validate(password); const strength = PasswordStrengthChecker.validate(password);
return strength.value >= 2 && strength.length < 32; return strength.value >= 2 && strength.length <= 32;
} }
export default function (req: Request, res: Response, next: NextFunction) { export default function (req: Request, res: Response, next: NextFunction) {