Ticket #3603: emailpatch.patch

File emailpatch.patch, 910 bytes (added by Richard Smith <richard@…>, 17 years ago)

Email patch

  • django/core/validators.py

    diff -r -u django/django/core/validators.py djangonewsrc/django/core/validators.py
    old new  
    2424email_re = re.compile(
    2525    r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*"  # dot-atom
    2626    r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-011\013\014\016-\177])*"' # quoted-string
    27     r')@(?:[A-Z0-9-]+\.)+[A-Z]{2,6}$', re.IGNORECASE)  # domain
     27    r')@(((?:[A-Z0-9-]+\.)+[A-Z]{2,6})|((?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)))$', re.IGNORECASE)  # domain
    2828integer_re = re.compile(r'^-?\d+$')
    2929ip4_re = re.compile(r'^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$')
    3030phone_re = re.compile(r'^[A-PR-Y0-9]{3}-[A-PR-Y0-9]{3}-[A-PR-Y0-9]{4}$', re.IGNORECASE)
Back to Top