# \[dry-schema\] Unexpected results when key ends with question mark

**URL:** <https://discourse.dry-rb.org/t/dry-schema-unexpected-results-when-key-ends-with-question-mark/1007>\
**Category:** Support\
**Created:** [March 4, 2020, 3:51pm UTC](https://discourse.dry-rb.org/t/dry-schema-unexpected-results-when-key-ends-with-question-mark/1007 "2020-03-04T15:51:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pavelbonda](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.dry-rb.org/pavelbonda/32/493_2.png) [@pavelbonda](https://discourse.dry-rb.org/u/pavelbonda)\
**Post date:** [March 4, 2020, 3:51pm UTC](https://discourse.dry-rb.org/t/dry-schema-unexpected-results-when-key-ends-with-question-mark/1007/1 "2020-03-04T15:51:49Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![solnic](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.dry-rb.org/solnic/32/779_2.png) [@solnic](https://discourse.dry-rb.org/u/solnic)\
**Post date:** [March 7, 2020, 9:02am UTC](https://discourse.dry-rb.org/t/dry-schema-unexpected-results-when-key-ends-with-question-mark/1007/2 "2020-03-07T09:02:35Z")

</div>

hey Pavel!

No, this is not expected behavior. I _think_ it’s because keys with question marks denote optional keys in dry-types, which is used under the hood to coerce input. Please [report an issue](https://github.com/dry-rb/dry-schema/issues/new?assignees=&labels=bug&template=---bug-report.md&title=) about it and I’ll fix it.

Cheers!
