Opened 4 years ago

Closed 4 years ago

#16313 closed Bug (duplicate)

forms.EmailField does not match length requirements of models.EmailField

Reported by: natevw Owned by: nobody
Component: Forms Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no


Django's models.EmailField has a default max_length=75 and thus database truncation errors will result from anything longer. Django's forms.EmailField does not have a default max_length and thus saving a "valid" 80 character email address from a form field to a model field that are both using the defaults results in an exception. forms.EmailField should default to max_length=75 so that it works as expected even when used outside of a ModelForm.

Change History (1)

comment:1 Changed 4 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #12900, #11579, #11365, and many others.

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