From 5693926345ab33d183a515e016d63b78bbce3e69 Mon Sep 17 00:00:00 2001 From: Iveta Date: Thu, 19 Oct 2023 15:37:29 -0400 Subject: [PATCH] New password must be at least 12 chars long --- src/helpers/validateNewPassword.ts | 4 ++-- src/pages/ResetPassword.tsx | 14 +++++++++++--- src/pages/SetNewPassword.tsx | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/helpers/validateNewPassword.ts b/src/helpers/validateNewPassword.ts index 1c2cee9..77c4c87 100644 --- a/src/helpers/validateNewPassword.ts +++ b/src/helpers/validateNewPassword.ts @@ -7,8 +7,8 @@ export const validateNewPassword = (password: string): string => { if (!password) { errorMsg = "Password is required"; - } else if (password.length < 8) { - errorMsg = "Password must be at least 8 characters long"; + } else if (password.length < 12) { + errorMsg = "Password must be at least 12 characters long"; } else if (!passwordStrength.test(password)) { errorMsg = "Password must have at least one uppercase letter, lowercase letter, number, and symbol."; diff --git a/src/pages/ResetPassword.tsx b/src/pages/ResetPassword.tsx index 2f5f0a6..ba6877d 100644 --- a/src/pages/ResetPassword.tsx +++ b/src/pages/ResetPassword.tsx @@ -81,8 +81,16 @@ export const ResetPassword = () => { {forgotPassword.errorString && ( - {forgotPassword.errorString}. Check your email for the correct - token. + {forgotPassword.errorString} + {forgotPassword.errorExtras ? ( + + ) : null} )} @@ -95,7 +103,7 @@ export const ResetPassword = () => {
New password must be: