Opened 19 years ago
Closed 17 years ago
#690 closed defect (duplicate)
Model allowed me to 'hide' a required field, which produced unuseable error messages.
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | contrib.admin | Version: | |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I had a data model which had a required field 'text'. When I was ordering the fields using the following syntax:
admin = meta.Admin(
# Add this to order the fields and even group them!
fields = (
(None, {'fields': ('title', 'published_date')} ),
("Categories", {'fields': ('categories',)} ),
)
)
I forgot to put in the 'text' field. Which meant that when I was adding a new item, it would complain that I should fix the 'error' below, but there was no error listed below, because the text field was never shown. The validate command should catch this maybe? But at the very least, if error messages aren't shown during the display of the form, they should be shown in a final list at the end. Or something.
Change History (3)
comment:1 by , 18 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 17 years ago
Does this affect newforms-admin? If not, as the current admin is scheduled to die in a near future we could add a reminder on the notes telling users to not hide required fields ;)
This seems to come up in the IRC channel a couple of times a week.