From 1e34e91909d6c8de9543011b4f0416d9449fb4d5 Mon Sep 17 00:00:00 2001 From: Bernhard Schussek Date: Tue, 27 Nov 2012 23:24:28 +0100 Subject: [PATCH] [Form] Added upgrade instructions to the UPGRADE file --- UPGRADE-2.2.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/UPGRADE-2.2.md b/UPGRADE-2.2.md index a14fdda35b..f8ff48cdd0 100644 --- a/UPGRADE-2.2.md +++ b/UPGRADE-2.2.md @@ -64,6 +64,26 @@ Symfony\Component\Form\Exception namespace or to create custom exception classes for your purpose. + * Translating validation errors is now optional. You can still do so + manually if you like, or you can simplify your templates to simply output + the already translated message. + + Before: + + ``` + {{ + error.messagePluralization is null + ? error.messageTemplate|trans(error.messageParameters, 'validators') + : error.messageTemplate|transchoice(error.messagePluralization, error.messageParameters, 'validators') + }} + ``` + + After: + + ``` + {{ error.message }} + ``` + #### Deprecations * The methods `getParent()`, `setParent()` and `hasParent()` in