Opened 13 years ago
Closed 10 years ago
#17272 closed Bug (fixed)
Document that non-editable fields do not get validated at a model level
Reported by: | Mitar | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | |
Severity: | Normal | Keywords: | |
Cc: | mmitar@… | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
From the code and behavior it seems that non-editable fields do not get validated at a model level with default validation (like null and blank check). This is a big consequence and should be documented. If you want to make all validation at a model level, according to a DRY principle, so that validation is not repeated at a form level, but then this validation is not run if you want to disable editing this fields in admin (but you want to allow editing in some your other forms where you use ModelForm). This is really strange and should be at least documented in reference for model fields, where all field options are documented, for editable, that this will disable default validation at model level.
Change History (3)
comment:1 by , 13 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 13 years ago
comment:3 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Additionally, editable should mention that field is then hidden also from ModelForm made forms. (Together with not validated anymore at the model level.)