From 14225067eb7107aa6555c37e7d731ff2120a08e6 Mon Sep 17 00:00:00 2001 From: Bernhard Schussek Date: Tue, 22 May 2012 11:22:27 +0200 Subject: [PATCH] [Form] Clarified the usage of "constraints" in the UPGRADE file --- UPGRADE-2.1.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/UPGRADE-2.1.md b/UPGRADE-2.1.md index c8faf03578..dad88e9117 100644 --- a/UPGRADE-2.1.md +++ b/UPGRADE-2.1.md @@ -559,6 +559,17 @@ )); ``` + Unlike previously, you can also pass a list of constraints now: + + ``` + $builder->add('name', 'text', array( + 'constraints' => array( + new NotBlank(), + new MinLength(3), + ), + )); + ``` + ### Validator * The methods `setMessage()`, `getMessageTemplate()` and