From df0e1d7bf4adbf8e40c11ff33bc0c9baa9096d4a Mon Sep 17 00:00:00 2001 From: Julien Muchembled <jm@nexedi.com> Date: Tue, 24 Jan 2017 11:14:08 +0100 Subject: [PATCH] Accept emails with TLD of more than 6 characters --- product/Formulator/Validator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product/Formulator/Validator.py b/product/Formulator/Validator.py index 92611cf8f1..be6dd6e919 100644 --- a/product/Formulator/Validator.py +++ b/product/Formulator/Validator.py @@ -175,7 +175,7 @@ class EmailValidator(StringValidator): # brackets around the address (we assume these would be added by # some custom script if needed), and of course no characters that # don't belong in an e-mail address. - pattern = re.compile('^[0-9a-zA-Z_\'&.%+-]+@([0-9a-zA-Z]([0-9a-zA-Z-]*[0-9a-zA-Z])?\.)+[a-zA-Z]{2,6}$') + pattern = re.compile('^[0-9a-zA-Z_\'&.%+-]+@([0-9a-zA-Z]([0-9a-zA-Z-]*[0-9a-zA-Z])?\.)+[a-zA-Z]{2,}$') def validate(self, field, key, REQUEST): value = StringValidator.validate(self, field, key, REQUEST) -- 2.30.9