diff --git a/django/core/validators.py b/django/core/validators.py
index 458f419..1cc9ab5 100644
a
|
b
|
class EmailValidator(RegexValidator):
|
136 | 136 | email_re = re.compile( |
137 | 137 | r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*" # dot-atom |
138 | 138 | r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-011\013\014\016-\177])*"' # quoted-string |
139 | | r')@((?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+[A-Z]{2,6}\.?$)' # domain |
| 139 | r')@((?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+[A-Z]{2,6}$)' # domain |
140 | 140 | r'|\[(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}\]$', re.IGNORECASE) # literal form, ipv4 address (SMTP 4.1.3) |
141 | 141 | validate_email = EmailValidator(email_re, _(u'Enter a valid e-mail address.'), 'invalid') |
142 | 142 | |
diff --git a/tests/modeltests/validators/tests.py b/tests/modeltests/validators/tests.py
index 9e254b9..bee29fa 100644
a
|
b
|
TEST_DATA = (
|
30 | 30 | (validate_email, 'a @x.cz', ValidationError), |
31 | 31 | (validate_email, 'something@@somewhere.com', ValidationError), |
32 | 32 | (validate_email, 'email@127.0.0.1', ValidationError), |
| 33 | (validate_email, 'email@here.com.', ValidationError), |
33 | 34 | |
34 | 35 | (validate_slug, 'slug-ok', None), |
35 | 36 | (validate_slug, 'longer-slug-still-ok', None), |