From 034727f94ce8f1247d3ea7c18ff1bb2730522a41 Mon Sep 17 00:00:00 2001 From: Timo Bakx Date: Sat, 21 Nov 2020 18:34:04 +0100 Subject: [PATCH] [Form] Fixed the layout in the forms page by moving the configuration tabs outside the versionadded block. --- forms.rst | 65 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 35 insertions(+), 30 deletions(-) diff --git a/forms.rst b/forms.rst index f7acdd18fe2..832a11ca075 100644 --- a/forms.rst +++ b/forms.rst @@ -560,46 +560,51 @@ To see the second approach - adding constraints to the form - and to learn more about the validation constraints, please refer to the :doc:`Symfony validation documentation `. +Form Validation Messages +~~~~~~~~~~~~~~~~~~~~~~~~ + .. versionadded:: 5.2 - In Symfony 5.2, the form validation messages have been rewritten to be more - user-friendly. Set the ``legacy_error_messages`` option to ``false`` to - enable these new messages: + The ``framework.form.legacy_error_messages`` option was introduced in Symfony 5.2 - .. configuration-block:: +The form validation messages have been rewritten to be more user-friendly. +To enable these new messages set the ``legacy_error_messages`` option in ``framework``, +``form`` to ``false``: + +.. configuration-block:: - .. code-block:: yaml + .. code-block:: yaml - # config/packages/framework.yaml - framework: - form: - legacy_error_messages: false + # config/packages/framework.yaml + framework: + form: + legacy_error_messages: false - .. code-block:: xml + .. code-block:: xml - - - + + + - - - - + + + + - .. code-block:: php + .. code-block:: php - // config/packages/framework.php - $container->loadFromExtension('framework', [ - 'form' => [ - 'legacy-error-messages' => false, - ], - ]); + // config/packages/framework.php + $container->loadFromExtension('framework', [ + 'form' => [ + 'legacy_error_messages' => false, + ], + ]); Other Common Form Features --------------------------