We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following code result in key not found: "int?" (Dry::Container::KeyError)
key not found: "int?" (Dry::Container::KeyError)
module Types include Dry::Types() end class B < Dry::Validation::Contract json do optional(:id).filled(Types::Integer | Types::String) end end
dry-validation: 1.8.1 dry-schema: 1.10.2 dry-types: 1.5.1 ruby: 3.1.2
The text was updated successfully, but these errors were encountered:
Please provide a reproduction script, the snippet you provided works for me.
Sorry, something went wrong.
oh and btw, I would do it like that anyway:
optional(:id) { int? | (str? & filled?) }
This makes more sense, because it's supposed to be either an integer or a string that's not empty.
No branches or pull requests
The following code result in
key not found: "int?" (Dry::Container::KeyError)
dry-validation: 1.8.1
dry-schema: 1.10.2
dry-types: 1.5.1
ruby: 3.1.2
The text was updated successfully, but these errors were encountered: