# Dry-validation without hashes as input

**URL:** <https://discourse.dry-rb.org/t/dry-validation-without-hashes-as-input/349>\
**Category:** dry-validation\
**Created:** [September 29, 2017, 12:23pm UTC](https://discourse.dry-rb.org/t/dry-validation-without-hashes-as-input/349 "2017-09-29T12:23:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkristian1](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.dry-rb.org/mkristian1/32/288_2.png) [@mkristian1](https://discourse.dry-rb.org/u/mkristian1)\
**Post date:** [September 29, 2017, 12:23pm UTC](https://discourse.dry-rb.org/t/dry-validation-without-hashes-as-input/349/1 "2017-09-29T12:23:55Z")

</div>

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](https://github.com/dry-rb/dry-validation/blob/master/lib/dry/validation/schema/rule.rb#L38) by removing `key?(:hash?).and`
