8000 [Validator] Pass validation groups on Collection validate. by Aliance · Pull Request #23480 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Validator] Pass validation groups on Collection validate. #23480

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

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Pass validation groups on Collection validate.
  • Loading branch information
Aliance committed Sep 24, 2017
commit a585590e10801af26cc64cd897be17fb177e7745
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ public function validate($value, Constraint $constraint)
$context->getValidator()
->inContext($context)
->atPath('['.$field.']')
->validate($value[$field], $fieldConstraint->constraints);
->validate($value[$field], $fieldConstraint->constraints, $fieldConstraint->groups);
} else {
// 2.4 API
$context->validateValue($value[$field], $fieldConstraint->constraints, '['.$field.']');
$context->validateValue($value[$field], $fieldConstraint->constraints, '['.$field.']', $fieldConstraint->groups);
}
}
} elseif (!$fieldConstraint instanceof Optional && !$constraint->allowMissingFields) {
Expand Down
0