Custom EMPTY_VALUES for form fields.
|Reported by:||loic84||Owned by:||loic84|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Form fields should be able to decide for themselves what value they consider empty rather than through the catch-all
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.