Opened 17 years ago
Closed 17 years ago
#4981 closed (wontfix)
Unchecked BooleanFields raise validation error
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Forms | Version: | dev |
Severity: | Keywords: | BooleanField | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
BooleanFields should not call "super(BooleanField, self).clean(value)" as that raises a validation error if the field is not included in the data, and unchecked boolean fields aren't included in HTTP POST.
Attachments (1)
Change History (5)
by , 17 years ago
Attachment: | patch.diff added |
---|
comment:1 by , 17 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 17 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
What's the point of a checkbox that has to be checked? The docs say that BooleanFields will never raise a validation error.
comment:3 by , 17 years ago
One use case off the top of my head: Having users agree to a site's terms of service by checking a box.
comment:4 by , 17 years ago
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
Closing for the reasons pointed out in the comments.
It's supposed to. Try
required=False