Opened 9 years ago

Closed 9 years ago

#25065 closed Uncategorized (invalid)

Should EmailField empty_strings_allowed be False

Reported by: Alex Orange Owned by: nobody
Component: Database layer (models, ORM) Version: 1.8
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Sorry for stating this as a question, I'm a little new to django internals. Someone should check that I understand the usage of empty_strings_allowed properly. It seems that perhaps EmailField should have empty_strings_allowed set to False since empty strings don't validate.

Change History (1)

comment:1 by Tim Graham, 9 years ago

Resolution: invalid
Status: newclosed

empty_strings_allowed controls whether empty values may be stored as an empty string or if they must be stored as null. In the case of EmailField, empty strings are fine. See also the second paragraph in the Field.null docs.

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