Skip to content

Instantly share code, notes, and snippets.

@wjzijderveld
Created August 19, 2014 11:40
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 wjzijderveld/8010ee5fbdc5d4a73be3 to your computer and use it in GitHub Desktop.
Save wjzijderveld/8010ee5fbdc5d4a73be3 to your computer and use it in GitHub Desktop.
<?php
// assumes $form available and $this->validator injected
// ConstraintViolationList
$violationList = $this->validator->validate($form);
$violationMapper = new ViolationMapper();
foreach ($violationList as $violation) {
$violationMapper->mapViolation($violation, $form);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment