Opened 10 years ago

Closed 10 years ago

#22408 closed Bug (invalid)

required BooleanField raises ValidationError when given "False" value

Reported by: xiaowl@… 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.

Change History (1)

comment:1 by Tim Graham, 10 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top