Skip to content

Conversation

wanabe
Copy link
Contributor

@wanabe wanabe commented Aug 20, 2020

Hello,

Grape::Validations::Base#validate! calls #validate_param! only if @scope.meets_dependency?(val, params) is truthy.
But Grape::Validations::DefaultValidator#validate! ignores the cope dependency now.

It doesn't matter in most cases because of @scope.should_validate?, but this is not the case for an array that contains both matching and non-matching conditions.
So I guess Grape::Validations::DefaultValidator#validate! should the check scope dependency as same as Grape::Validations::Base#validate!.

How about it?

@dblock dblock merged commit fe6a4a4 into ruby-grape:master Aug 20, 2020
@dblock
Copy link
Member

dblock commented Aug 20, 2020

Thanks for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants