flash-gordon on or_nil-extension
flash-gordon on custom-builder-methods
flash-gordon on master
Support for custom builder meth… Merge pull request #415 from dr… (compare)
Hi guys, it seems that I maybe encounter a bug of
dry-types SUM, but I'm not sure. Could you help me on this?
It happens when I try to verify a object which should be a hash or a string
test = Dry::Types['hash'].map(Dry::Types['symbol'], Dry::Types['strict.string']) | Dry::Types['strict.string'] test[a: 'b'] # passed as expected test['a' => 'b'] # should fail but pass! test['test'] # passed as expected test # should fail but pass!
I'm wondering if there is anything that I didn't notice or I use the wrong way to build my rule. Thanks :)
Links = Map(Symbol, String | JSONAPI::Types::Link.optional)