From 38a9f8f9a90f38d1b6282926e41d24cd7f34e18a Mon Sep 17 00:00:00 2001 From: Aleksei Shpakovskii Date: Fri, 6 Aug 2021 21:57:33 +0200 Subject: [PATCH] Allow "plus" in email address so you could use email like `username+tag@example.com` (gtmetrix themselves allow this) --- gtmetrix/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtmetrix/utils.py b/gtmetrix/utils.py index ad773a7..62cee4e 100644 --- a/gtmetrix/utils.py +++ b/gtmetrix/utils.py @@ -112,7 +112,7 @@ # Snagged from: https://www.scottbrady91.com/Email-Verification/Python-Email-Verification-Script email_re = re.compile( - '^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(''\.[a-z]{2,''4})$') + '^[_a-z0-9+-]+(\.[_a-z0-9+-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(''\.[a-z]{2,''4})$') def validate_email(email):