From 1cceab4d5e0633478a1ba6eafe2cb95c00fb9e85 Mon Sep 17 00:00:00 2001 From: Marius Kimmina <38843153+mariuskimmina@users.noreply.github.com> Date: Mon, 26 Dec 2022 11:32:18 +0100 Subject: [PATCH] fix(FE): remove unnecessary complexity from password check (#1904) Signed-off-by: Marius Kimmina --- frontend/src/pages/SignUp/utils.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/frontend/src/pages/SignUp/utils.ts b/frontend/src/pages/SignUp/utils.ts index a71c4029cf..b6c746fcd6 100644 --- a/frontend/src/pages/SignUp/utils.ts +++ b/frontend/src/pages/SignUp/utils.ts @@ -6,10 +6,8 @@ */ export const isPasswordValid = (value: string): boolean => { // eslint-disable-next-line prefer-regex-literals - const pattern = new RegExp( - '^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$', - ); + const pattern = new RegExp('^.{8,}$'); return pattern.test(value); }; -export const isPasswordNotValidMessage = `Password must a have minimum of 8 characters with at least one lower case, one number ,one upper case and one special character`; +export const isPasswordNotValidMessage = `Password must a have minimum of 8 characters`;