Opened 10 years ago
Closed 10 years ago
#25065 closed Uncategorized (invalid)
Should EmailField empty_strings_allowed be False
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.
Note:
See TracTickets
for help on using tickets.
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 ofEmailField
, empty strings are fine. See also the second paragraph in the Field.null docs.