-
-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined method visit_d for an "optional" validation #386
Comments
From @chikamichi on December 16, 2016 12:24 I've found that the error only occurs when activating dry-validation's sanitizer ( |
From @flash-gordon on February 1, 2018 23:17 I'll close this issue since it's on the dry-v side mostly. We are working on dry-validation 1.0, it's going to take a while but we hope to push a beta in two to three months (optimistic mode on). It's probably a good idea to check if this will work fine there so pls bring this issue to dry-validation's repo. |
Can confirm the issue. Thanks! |
Previously using `optional('height').filled` produced ``` NoMethodError: undefined method `visit_height' for #<Dry::Types::Compiler:0x007fdf3f9eb530 @registry=Dry::Types> ``` when the input_processor was set to sanitizer. Input processor compiler was checking only if the key was a symbol. Now it also checks for string keys. Fixes dry-rb#386
Closing because this works fine in dry-schema. |
From @chikamichi on December 15, 2016 11:5
Hi,
Using dry-types 0.9.3 through dry-validation, this simple rule:
triggers:
Nothing fancy about the way I use dry-validation here.
required
works just fine, the error only gets triggered byoptional
with a block, therefore I suspect eithervisit_sum
to be doing something wrong, or what's fed tovisit_sum
to be incorrect.Copied from original issue: dry-rb/dry-types#172
The text was updated successfully, but these errors were encountered: