8000 [Form] Clarified the usage of "constraints" in the UPGRADE file · symfony/symfony@1422506 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1422506

Browse files
committed
[Form] Clarified the usage of "constraints" in the UPGRADE file
1 parent af41a1a commit 1422506

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

UPGRADE-2.1.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,17 @@
559559
));
560560
```
561561
562+
Unlike previously, you can also pass a list of constraints now:
563+
564+
```
565+
$builder->add('name', 'text', array(
566+
'constraints' => array(
567+
new NotBlank(),
568+
new MinLength(3),
569+
),
570+
));
571+
```
572+
562573
### Validator
563574
564575
* The methods `setMessage()`, `getMessageTemplate()` and

0 commit comments

Comments
 (0)
0