Open
Description
class UpdateForm(BaseModel):
is_foo: bool
Renders to a required checkbox, so it always has to be "true" on submission!
workaround for now is to consider None as False. (so it makes checkbox optional), but that'd be cool to see this fixed :)
BoolUpdate = Annotated[bool | None, AfterValidator(lambda v: False if v is None else v)]
class UpdateForm(BaseModel):
is_foo: BoolUpdate = False