Dry-validation without hashes as input

it is possible to use dry-validation schema as long the object you provide has a key? and a [] method. but when you use nested schemas then there is check if the nested object/node is Hash. I wonder if this can be unified in the sense that nested schema have the same requirements on the input value as top-level schema ? the code change is minimal in this line: https://github.com/dry-rb/dry-validation/blob/master/lib/dry/validation/schema/rule.rb#L38 by removing key?(:hash?).and

1 Like