Hi everyone!
I’m new here, recently I tried to use dry-schema for data validation in existing app, I have a couple of use cases when hash keys end with question mark, like { 'terms_of_usage?' => 'Y' }
.
Looks like dry-schema ignores such keys, here the code:
MySchema = Dry::Schema.Params do
required(:some?).filled(:string)
end
MySchema.('some?' => 'val')
=> #<Dry::Schema::Result{} errors={:some?=>["is missing"]}>
Is it expected behaviour? I didn’t find any mention of this in docs, sorry if I’m wrong.
I’m using:
ruby 2.6.5
dry-schema 1.4.3