diff options
author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-01-07 18:48:12 +0000 |
---|---|---|
committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-01-07 18:48:12 +0000 |
commit | 9e124926167e2565ab64976bd20e131aca330ebd (patch) | |
tree | 1c96dd1737d48c52279d8c9f2ac65e957f60e959 /django | |
parent | a9789c0d444869dd4cfe0ba7e17b5d404b81ac6b (diff) | |
download | django-9e124926167e2565ab64976bd20e131aca330ebd.tar.gz |
[1.3.X] Fixed #17100 -- Typo in the regex for EmailValidator. Backport of r17349 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.3.X@17350 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r-- | django/core/validators.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/core/validators.py b/django/core/validators.py index a93c6ac975..9dcc2bc3ab 100644 --- a/django/core/validators.py +++ b/django/core/validators.py @@ -147,7 +147,8 @@ class EmailValidator(RegexValidator): email_re = re.compile( r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*" # dot-atom - r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-011\013\014\016-\177])*"' # quoted-string + # quoted-string, see also http://tools.ietf.org/html/rfc2822#section-3.2.5 + r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-\011\013\014\016-\177])*"' r')@(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+[A-Z]{2,6}\.?$', re.IGNORECASE) # domain validate_email = EmailValidator(email_re, _(u'Enter a valid e-mail address.'), 'invalid') |