From 1cc39515f51d8ff99fd55b10be26cce14aec1c40 Mon Sep 17 00:00:00 2001 From: ZL Date: Sat, 19 Oct 2024 23:37:10 +1300 Subject: [PATCH] adding regex for .com --- client/src/store/SignUpForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/store/SignUpForm.tsx b/client/src/store/SignUpForm.tsx index d1d4e0df4..137176e04 100644 --- a/client/src/store/SignUpForm.tsx +++ b/client/src/store/SignUpForm.tsx @@ -57,7 +57,7 @@ const actions = { const { email, confirmEmail, phone_number, emergency_contact } = getState() const validRegex = - /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/ + /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-]{2,}$/ if (!email.match(validRegex)) { invalidFields.push("Email")