Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Optional BooleanString decoding issue #907

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

crishoj
Copy link
Contributor

@crishoj crishoj commented Nov 3, 2024

Possible fix for #872:

Using the following schema, the query string ?other=foo is rejected with 422 expected boolean.

t.Object({
    registered: t.Optional(t.Boolean()),
    other: t.String(),
})

The validation error is thrown in BooleanString.Decode.

@bogeychan please correct me if I'm wrong — I assume the intention in Decode is to check if value is present, not property?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant