diff --git a/django/core/validators.py b/django/core/validators.py
index b1b82db..16be826 100644
a
|
b
|
class EmailValidator(RegexValidator):
|
114 | 114 | raise |
115 | 115 | |
116 | 116 | email_re = re.compile( |
117 | | r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*" # dot-atom |
| 117 | r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.+[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*" # dot-atom |
118 | 118 | r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-011\013\014\016-\177])*"' # quoted-string |
119 | 119 | r')@(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+[A-Z]{2,6}\.?$', re.IGNORECASE) # domain |
120 | 120 | validate_email = EmailValidator(email_re, _(u'Enter a valid e-mail address.'), 'invalid') |
diff --git a/tests/modeltests/validators/tests.py b/tests/modeltests/validators/tests.py
index 44ad176..870a5d6 100644
a
|
b
|
TEST_DATA = (
|
20 | 20 | |
21 | 21 | (validate_email, 'email@here.com', None), |
22 | 22 | (validate_email, 'weirder-email@here.and.there.com', None), |
| 23 | (validate_email, 'example...99@valid.com', None), |
23 | 24 | |
24 | 25 | (validate_email, None, ValidationError), |
25 | 26 | (validate_email, '', ValidationError), |
26 | 27 | (validate_email, 'abc', ValidationError), |
27 | 28 | (validate_email, 'a @x.cz', ValidationError), |
28 | 29 | (validate_email, 'something@@somewhere.com', ValidationError), |
| 30 | (validate_email, 'example.@invalid.com', ValidationError), |
29 | 31 | |
30 | 32 | (validate_slug, 'slug-ok', None), |
31 | 33 | (validate_slug, 'longer-slug-still-ok', None), |