return Lists.transform(Lists.newArrayList(violation.getConstraintViolations()),
new Function<ConstraintViolation<?>, ValidationError>() {
@Override
public ValidationError apply(final ConstraintViolation<?> violation) {
return new ValidationError(
violation.getMessage(),
violation.getMessageTemplate(),
getViolationPath(violation),
getViolationInvalidValue(violation.getInvalidValue())
);