-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Unsupported nested given blocks #1800
Labels
Comments
It should be supported, care to PR a spec? |
@dblock The issue seems being that validations are not isolated when defined into a optional :filters, type: Array, default: [] do
requires :name, type: String, values: [.....]
requires :operator, values: [......]
given name: ->(val) {val == 'name'} do
requires :operator, values: ['a', 'b']
optional :p1
optional :p2
at_least_one_of :p1, :p2
end
given name: ->(val) {val == 'another_name'} do
requires :operator, values: ['a']
optional :p3
end
end Executing a call where |
@andreacfm Try HEAD, #1811 fixes this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example:
This fails because the params :operator seems not defined when passed to the nested given block. Is this use case supported?
The text was updated successfully, but these errors were encountered: