Commit df0e1d7b authored by Julien Muchembled's avatar Julien Muchembled

Accept emails with TLD of more than 6 characters

parent 39c85c8b
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment