Opened 13 months ago
Last modified 13 months ago
#35119 assigned Cleanup/optimization
Unify max_length for EmailValidator and model's and form's EmailField
Reported by: | jecarr | Owned by: | Kushagra S |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Kushagra S | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | yes |
Needs tests: | yes | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Pull Requests: | 17763 build:success | ||
Description ¶
As per this discussion, there is consideration to make the max_length values the same for EmailValidator and EmailField
According to the ticket's flags, the next step(s) to move this issue forward are:
- To add tests to the patch, then uncheck the "Needs tests" flag on the ticket.
- To write documentation for the patch, then uncheck "Needs documentation" on the ticket.
- To improve the patch as described in the pull request review comments or on this ticket, then uncheck "Patch needs improvement".
If creating a new pull request, include a link to the pull request in the ticket comment when making that update. The usual format is:
[https://github.com/django/django/pull/#### PR]
.
Change History (7)
follow-up: 5 comment:1 by , 13 months ago
Triage Stage: | Unreviewed → Accepted |
---|---|
Version: | 5.0 → dev |
comment:2 by , 13 months ago
Summary: | Have the same max_length for EmailValidator and EmailField → Unify max_length for EmailValidator and model's and form's EmailField |
---|
comment:3 by , 13 months ago
Cc: | added |
---|---|
Has patch: | set |
Owner: | changed from | to
Status: | new → assigned |
comment:4 by , 13 months ago
Needs documentation: | set |
---|---|
Needs tests: | set |
Patch needs improvement: | set |
comment:5 by , 13 months ago
Replying to Natalia Bidart:
jecarr would you be interested in pushing this forward?
Thanks Natalia, happy to do so whilst going with your direction on this. Should I start by creating test cases to analyse the different combinations you outlined?
comment:7 by , 13 months ago
Sure, ok - when I wrote my previous comment the PR wasn't linked. I'll leave it to Kushagra S and happy to help if needed.
Accepting following ticket:34961#comment:9, where it's suggested that we should unify
max_length
to be 254 across theEmailValidator
and the form's and model'sEmailField
.But before moving forward, I would like us to understand the implications of reducing the
max_length
for the validator and form field, and evaluate whether a deprecation warning/process is needed.I think we should make an analysis about how existing code bases could be affected by this change. Ideally we would describe how different combinations of using model's and form's
EmailField
would interact with each other when themax_length
changes, considering bothModelForm
s andForm
s. jecarr would you be interested in pushing this forward?