Skip to content

please fix z.coerce.boolean() for "false" #3924

Closed

Description

@jayarjo

Note — Boolean coercion with z.coerce.boolean() may not work how you expect. Any truthy value is coerced to true, and any falsy value is coerced to false.

This is not intuitive and irrational. Please fix z.coerce.boolean() to produce false from "false".

Otherwise we can safely assume that coerce is simply broken (!) for booleans.

Activity

  1. maurer2 commented on Dec 24, 2024

    @maurer2

    Hello, some work is being done on the issue here: #3906

    Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions