Opened 7 years ago
Closed 6 years ago
#28788 closed New feature (wontfix)
Add support for Model.clean_<fieldname>
Reported by: | Jonas Haag | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Someday/Maybe | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Form.clean_<fieldname>
should have an equivalent in models, Model.clean_<fieldname>
.
I've implemented a proof of concept here: https://github.com/django/django/pull/9336
I'm not sure about backwards compatibility; we certainly don't want surprising calls to model methods that are called clean_XXX
by coincidence.
Change History (2)
comment:1 by , 7 years ago
Triage Stage: | Unreviewed → Someday/Maybe |
---|
comment:2 by , 6 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
The django-developers discussion didn't yield a consensus about this.
Note:
See TracTickets
for help on using tickets.
At first glance, my thought is "why duplicate the field
validators
API"? A consensus on the DevelopersMailingList to make this change is needed.