Opened 4 years ago

Closed 4 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


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 Changed 4 years ago by Tim Graham

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