Opened 15 years ago

Last modified 14 years ago

#12196 closed

EmailField reject this email address tosha...99@gmail.com — at Initial Version

Reported by: mtsyganov Owned by: nobody
Component: Forms Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

To fix that problem, just change

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
r')@(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+[A-Z]{2,6}\.?$', re.IGNORECASE) # domain

TO

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
r')@(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+[A-Z]{2,6}\.?$', re.IGNORECASE) # domain

in the file django.forms.fields.py

I just replaced in the first line the + to *

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top