Skip to content

Commit 73060e4

Browse files
committed
minor symfony#17087 [Validator] Use the new interface in the README (Ener-Getick)
This PR was merged into the 2.7 branch. Discussion ---------- [Validator] Use the new interface in the README | Q | A | ------------- | --- | Fixed tickets | symfony#17064 | License | MIT Commits ------- 1fbbe84 [Validator] Use the new interface in the README
2 parents 6a92f4e + 1fbbe84 commit 73060e4

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)