Opened 12 years ago
Closed 12 years ago
#22408 closed Bug (invalid)
required BooleanField raises ValidationError when given "False" value
| Reported by: | Owned by: | nobody | |
|---|---|---|---|
| Component: | Forms | Version: | 1.6 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Here the implementation of validation:
def validate(self, value):
if not value and self.required:
raise ValidationError...
When given "False" value, the validate will fail.
Note:
See TracTickets
for help on using tickets.
As documented: https://docs.djangoproject.com/en/1.6/ref/forms/fields/#booleanfield