Opened 11 months ago

Last modified 11 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

Description

As per this discussion, there is consideration to make the max_length values the same for EmailValidator and EmailField

Change History (7)

comment:1 by Natalia Bidart, 11 months ago

Triage Stage: UnreviewedAccepted
Version: 5.0dev

Accepting following ticket:34961#comment:9, where it's suggested that we should unify max_length to be 254 across the EmailValidator and the form's and model's EmailField.
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 the max_length changes, considering both ModelForms and Forms. jecarr would you be interested in pushing this forward?

comment:2 by Natalia Bidart, 11 months ago

Summary: Have the same max_length for EmailValidator and EmailFieldUnify max_length for EmailValidator and model's and form's EmailField

comment:3 by Kushagra S, 11 months ago

Cc: Kushagra S added
Has patch: set
Owner: changed from nobody to Kushagra S
Status: newassigned

comment:4 by Mariusz Felisiak, 11 months ago

Needs documentation: set
Needs tests: set
Patch needs improvement: set

in reply to:  1 comment:5 by jecarr, 11 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:6 by Tim Graham, 11 months ago

The ticket has already been claimed with a PR.

comment:7 by jecarr, 11 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.

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