Permalink
Browse files

[Validator] Fixed example in README file (fixes #4088)

  • Loading branch information...
1 parent c60c8a6 commit 156ea428713c6b39c288f7023c61cc6f88b15e2d @stloyd stloyd committed Apr 23, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 README.md
View
@@ -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),
));

0 comments on commit 156ea42

Please sign in to comment.