From fde94caad82bd3658c537ea8a5f0e009cdc5c512 Mon Sep 17 00:00:00 2001 From: Joseph Bielawski Date: Mon, 23 Apr 2012 18:53:08 +0300 Subject: [PATCH] [Validator] Fixed example in README file (fixes #4088) --- src/Symfony/Component/Validator/README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/Validator/README.md b/src/Symfony/Component/Validator/README.md index 3d16e04b85..b8475510fb 100644 --- a/src/Symfony/Component/Validator/README.md +++ b/src/Symfony/Component/Validator/README.md @@ -8,6 +8,7 @@ annotations, which can then be checked against instances of these classes. use Symfony\Component\Validator\Validator; use Symfony\Component\Validator\Mapping\ClassMetadataFactory; use Symfony\Component\Validator\Mapping\Loader\StaticMethodLoader; + use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\ConstraintValidatorFactory; $validator = new Validator( @@ -20,10 +21,10 @@ annotations, which can then be checked against instances of these classes. 'first_name' => new Assert\MinLength(101), 'last_name' => new Assert\MinLength(1), )), - 'email' => new Assert\Email(), - 'simple' => new Assert\MinLength(102), - 'gender' => new Assert\Choice(array(3, 4)), - 'file' => new Assert\File(), + 'email' => new Assert\Email(), + 'simple' => new Assert\MinLength(102), + 'gender' => new Assert\Choice(array(3, 4)), + 'file' => new Assert\File(), 'password' => new Assert\MinLength(60), ));