You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NestedSchema = Dry::Schema.define do
required(:bar).filled(:string)
end
BrokenSchema = Dry::Schema.Params do
required(:foo).maybe(:array).each(NestedSchema)
end
BrokenSchema.call({ foo: [{ bar: 123 }] }).errors.to_h
# => {:foo=>{0=>{:bar=>["must be a string"]}}}
BrokenSchema.call({ foo: [{ bar: '123' }] }).errors.to_h
# => {}
Describe the bug
Basically it is a reopening of the issue described (and reported as fixed) in #300
Valid keys of nested optional array set via
maybe(:array).each(schema)
are reported as incorrect. It occurs in latest version1.13.0
as wellTo Reproduce
Expected behavior
errors
for the snippet above are emptyMy environment
3.1.0
macos 11.6.7
The text was updated successfully, but these errors were encountered: