Skip to content

Commit

Permalink
Fix e-mail validation
Browse files Browse the repository at this point in the history
  • Loading branch information
tudoramariei committed Apr 9, 2024
1 parent eff6f7a commit 1dd79fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/donations/views/ngo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""

Expand Down

0 comments on commit 1dd79fa

Please sign in to comment.