File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1541,17 +1541,17 @@ but here's a short example:
1541
1541
1542
1542
.. code-block :: php
1543
1543
1544
- use Symfony\Component\Validator\Constraints\MinLength ;
1544
+ use Symfony\Component\Validator\Constraints\Length ;
1545
1545
use Symfony\Component\Validator\Constraints\NotBlank;
1546
1546
1547
1547
$builder
1548
1548
->add('firstName', 'text', array(
1549
- 'constraints' => new MinLength(3 ),
1549
+ 'constraints' => new Length(array('min' => 3) ),
1550
1550
))
1551
1551
->add('lastName', 'text', array(
1552
1552
'constraints' => array(
1553
1553
new NotBlank(),
1554
- new MinLength(3 ),
1554
+ new Length(array('min' => 3) ),
1555
1555
),
1556
1556
))
1557
1557
;
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ entry in that array:
82
82
$metadata->addPropertyConstraint('favoriteColors', new Assert\All(array(
83
83
'constraints' => array(
84
84
new Assert\NotBlank(),
85
- new Assert\MinLength (array('limit' => 5)),
85
+ new Assert\Length (array('limit' => 5)),
86
86
),
87
87
)));
88
88
}
You can’t perform that action at this time.
0 commit comments