Skip to content

Instantly share code, notes, and snippets.

@bakura10
Created August 27, 2013 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bakura10/6356212 to your computer and use it in GitHub Desktop.
Save bakura10/6356212 to your computer and use it in GitHub Desktop.
/** @var InputInterface $input */
foreach ($validationRecursiveIterator as $name => $input) {
$input->setValue(isset($data[$name]) ? $data[$name] : null);
if ($input->isValid($context)) {
continue;
}
$errorMessages[$name] = $input->getErrorMessages();
if ($input->breakOnFailure()) {
return $this->buildValidationResult($data, $errorMessages);
}
}
return $this->buildValidationResult($data, $errorMessages);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment