Skip to content

BooleanValidator validates any data as true for type: "boolean" #271

Open

Description

@belfordzjeeves

Description

Found while testing oneOf support (#201 / PR #267). BooleanValidator effectively validates any data as true for schemas declaring type: "boolean" — non-boolean data is accepted instead of failing validation.

Reproduction

{ "type": "boolean" }

validated against 42 (or "hello", or any non-boolean) returns valid.

Expected

Only actual booleans (true/false) should validate against type: "boolean"; anything else should produce a validation error.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions