#34961: Add a max_length parameter to EmailValidator
-------------------------------------+-------------------------------------
Reporter: jecarr | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Core (Other) | Version: 4.2
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):
* status: new => closed
* resolution: => wontfix
Comment:
The default maximum length of an email is 320 characters per RFC 3696
section 3, that's why `EmailValidator` that checks if string is an email
uses this boundary. There is no need to add `max_length` argument. If you
want to use a lower value you should add `MaxLengthValidator` that Django
will add automatically when you define `max_length` on model fields.
We could consider changing the default to `254` characters because it was
changed in [https://www.rfc-editor.org/rfc/rfc5321#section-4.5.3 RFC
5321], but this ticket is about adding `max_length` to the validator, so
it's "wontix" for me.
--
Ticket URL: <https://code.djangoproject.com/ticket/34961#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018d1230d5d1-c758dc9c-e6d3-42e4-b6f7-d77a4f9fc0a0-000000%40eu-central-1.amazonses.com.