diff -r c8373c5e600e django/db/models/fields/__init__.py
a
|
b
|
|
890 | 890 | description = _("E-mail address") |
891 | 891 | |
892 | 892 | def __init__(self, *args, **kwargs): |
| 893 | # max_length should be overridden to 254 characters to be fully |
| 894 | # compliant with RFCs 3696 and 5321 |
| 895 | |
893 | 896 | kwargs['max_length'] = kwargs.get('max_length', 75) |
894 | 897 | CharField.__init__(self, *args, **kwargs) |
895 | 898 | |
diff -r c8373c5e600e docs/ref/models/fields.txt
a
|
b
|
|
481 | 481 | |
482 | 482 | A :class:`CharField` that checks that the value is a valid email address. |
483 | 483 | |
| 484 | .. admonition:: Incompliance to RFCs |
| 485 | |
| 486 | The default 75 character ``max_length`` is not capable of storing all |
| 487 | possible RFC3696/5321-compliant email addresses. In order to store all |
| 488 | possible valid email addresses, a ``max_length`` of 254 is required. |
| 489 | The default ``max_length`` of 75 exists for historical reasons. The |
| 490 | default has not been changed in order to maintain backwards |
| 491 | compatibility with existing uses of :class:`EmailField`. |
| 492 | |
484 | 493 | ``FileField`` |
485 | 494 | ------------- |
486 | 495 | |