From abd2305607754f2258e090b9e8f547cc3f6762b1 Mon Sep 17 00:00:00 2001 From: Vins Date: Fri, 17 May 2024 15:54:38 +0200 Subject: [PATCH] Changed password Regexp to accept - and _ --- src/front/Components/Layouts/LoginCustomer/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/front/Components/Layouts/LoginCustomer/index.tsx b/src/front/Components/Layouts/LoginCustomer/index.tsx index 78c8af2e..6138b1f8 100644 --- a/src/front/Components/Layouts/LoginCustomer/index.tsx +++ b/src/front/Components/Layouts/LoginCustomer/index.tsx @@ -118,7 +118,7 @@ export default function Login() { return; } - const passwordRegex = new RegExp(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[A-Za-z\d@$!%*?&]{8,}$/); + const passwordRegex = new RegExp(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[A-Za-z\d@$!%*?&_\\-]{8,}$/); if (!passwordRegex.test(values["password"])) { setValidationErrors([ {