From 1dd79fa21e2b9c867f7504bd08fc2c6f9536a9fc Mon Sep 17 00:00:00 2001 From: Tudor Amariei Date: Tue, 9 Apr 2024 14:34:25 +0300 Subject: [PATCH] Fix e-mail validation --- backend/donations/views/ngo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/donations/views/ngo.py b/backend/donations/views/ngo.py index 555016aa..3ea8b185 100644 --- a/backend/donations/views/ngo.py +++ b/backend/donations/views/ngo.py @@ -272,7 +272,7 @@ def get_post_value(arg, add_to_error_list=True): # the email has the @ so the first regex will fail elif arg == "email": # if we found a match - if 5 > len(value) > 255 or re.match(r"^[\w-.]+@([\w-]+\.)+[\w-]{2,63}$", value) is None: + if 5 > len(value) > 255 or re.match(r"[^@]+@[^@]+\.[^@]+", value) is None: errors["fields"].append(arg) return ""