Skip to content

Commit 393e1d8

Browse files
committed
Removing some outdated references to MinLength
1 parent bd21918 commit 393e1d8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

book/forms.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -1541,17 +1541,17 @@ but here's a short example:
15411541

15421542
.. code-block:: php
15431543
1544-
use Symfony\Component\Validator\Constraints\MinLength;
1544+
use Symfony\Component\Validator\Constraints\Length;
15451545
use Symfony\Component\Validator\Constraints\NotBlank;
15461546
15471547
$builder
15481548
->add('firstName', 'text', array(
1549-
'constraints' => new MinLength(3),
1549+
'constraints' => new Length(array('min' => 3)),
15501550
))
15511551
->add('lastName', 'text', array(
15521552
'constraints' => array(
15531553
new NotBlank(),
1554-
new MinLength(3),
1554+
new Length(array('min' => 3)),
15551555
),
15561556
))
15571557
;

reference/constraints/All.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ entry in that array:
8282
$metadata->addPropertyConstraint('favoriteColors', new Assert\All(array(
8383
'constraints' => array(
8484
new Assert\NotBlank(),
85-
new Assert\MinLength(array('limit' => 5)),
85+
new Assert\Length(array('limit' => 5)),
8686
),
8787
)));
8888
}

0 commit comments

Comments
 (0)