From 8cb4496806d52ef30453837331e21c91c788f411 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Sun, 22 May 2016 23:24:27 +0200 Subject: [PATCH] README --- README.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9d3815a..88814ce 100644 --- a/README.md +++ b/README.md @@ -52,12 +52,21 @@ $validator->addDataConstraint(new Callback(function($data, ExecutionContextInter $validator->validate(); if ($validator->isValid() === false) { - foreach ($validator->getErrors() as $violation) { - $line = $violation->getLine(); - $column = $violation->getColumn(); - $message = $violation->getViolation()->getMessage(); + foreach ($validator->getErrors() as $error) { + $line = $error->getLine(); + $column = $error->getColumn(); + $message = $error->getViolation()->getMessage(); - // Up to you! + echo << +
  • Line: $line
  • +
  • Column: $column
  • +
  • +

    $message

    +
  • + + +EOF; } } ```