Skip to content

Commit 1fbbe84

Browse files
committed
[Validator] Use the new interface in the README
1 parent 6a92f4e commit 1fbbe84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Validator/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use Symfony\Component\Validator\Constraints\Length;
1818

1919
$validator = Validation::createValidator();
2020

21-
$violations = $validator->validateValue('Bernhard', new Length(array('min' => 10)));
21+
$violations = $validator->validate('Bernhard', new Length(array('min' => 10)));
2222
```
2323

2424
This validation will fail because the given string is shorter than ten
@@ -46,7 +46,7 @@ $constraint = new Assert\Collection(array(
4646
'password' => new Assert\Length(array('min' => 60)),
4747
));
4848

49-
$violations = $validator->validateValue($input, $constraint);
49+
$violations = $validator->validate($input, $constraint);
5050
```
5151

5252
Again, the validator returns the list of violations.

0 commit comments

Comments
 (0)