From 724b29f944006d8ab1ed06b14694cdcba199aa17 Mon Sep 17 00:00:00 2001 From: Vins Date: Thu, 23 May 2024 00:26:51 +0200 Subject: [PATCH] Password regex 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([ {