-
-
Notifications
You must be signed in to change notification settings - Fork 186
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
Form: gt? raises exception for unexpected Ruby type #132
Comments
This problem affects |
This is the same issue as I described in #135 (comment): form schemas are intended to receive data from rack-processed form posts only, which your test case here isn't providing. |
This is dry-rb/dry-types#86 issue, which affects dry-validation. Gonna close this one. |
@solnic the code does raises an error anymore but the result is still confusing: 2.3.1 :008 > result = form.call('foo' => '')
=> #<Dry::Validation::Result output={:foo=>nil} messages={:foo=>["must be filled", "must be greater than 23"]}>
2.3.1 :009 > result = form.call('foo' => '123jkl')
=> #<Dry::Validation::Result output={:foo=>"123jkl"} messages={:foo=>["must be an integer", "must be greater than 23"]}>
2.3.1 :010 > result = form.call('foo' => [123])
=> #<Dry::Validation::Result output={"foo"=>[123]} messages={:foo=>["is missing", "must be greater than 23"]}> Could you highlight the problem? |
@flash-gordon it's because of this: dry-rb/dry-types#87 |
Please note that I'm using
:int?
to ensure type safety, so I'm expecting that to fail, not to raise an error.The text was updated successfully, but these errors were encountered: