Opened 12 years ago
Closed 12 years ago
#19997 closed Cleanup/optimization (fixed)
Custom EMPTY_VALUES for form fields.
Reported by: | loic84 | Owned by: | loic84 |
---|---|---|---|
Component: | Forms | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Form fields should be able to decide for themselves what value they consider empty rather than through the catch-all validators.EMPTY_VALUES
.
An example of this would be a JSONField
that considers an empty dict
a valid non-empty value.
Model validation had the same issue, and it became problematic when the BinaryField was introduced, this has been addressed in #19989. Form fields would benefit from the same fix.
Attachments (1)
Change History (4)
comment:1 by , 12 years ago
Triage Stage: | Unreviewed → Accepted |
---|
by , 12 years ago
Attachment: | formfields_empty_values.diff added |
---|
comment:2 by , 12 years ago
comment:3 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
PR https://github.com/django/django/pull/886