Skip to content

Commit ac50348

Browse files
committed
minor #17478 [Form] Remove paragraph on legacy_error_messages config (manuelkiessling)
This PR was merged into the 6.2 branch. Discussion ---------- [Form] Remove paragraph on `legacy_error_messages` config As the `legacy_error_messages` config node is deprecated since 6.2 (see symfony/symfony#47598), it should probably not be mentioned in the docs any longer. Commits ------- 50bfc31 Remove paragraph on legacy_error_messages config
2 parents 66759cf + 50bfc31 commit ac50348

File tree

1 file changed

+0
-42
lines changed

1 file changed

+0
-42
lines changed

forms.rst

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -559,48 +559,6 @@ To see the second approach - adding constraints to the form - and to
559559
learn more about the validation constraints, please refer to the
560560
:doc:`Symfony validation documentation </validation>`.
561561

562-
Form Validation Messages
563-
~~~~~~~~~~~~~~~~~~~~~~~~
564-
565-
The form types have default error messages that are more clear and
566-
user-friendly than the ones provided by the validation constraints. To enable
567-
these new messages set the ``legacy_error_messages`` option to ``false``:
568-
569-
.. configuration-block::
570-
571-
.. code-block:: yaml
572-
573-
# config/packages/framework.yaml
574-
framework:
575-
form:
576-
legacy_error_messages: false
577-
578-
.. code-block:: xml
579-
580-
<!-- config/packages/framework.xml -->
581-
<?xml version="1.0" encoding="UTF-8" ?>
582-
<container xmlns="http://symfony.com/schema/dic/services"
583-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
584-
xmlns:framework="http://symfony.com/schema/dic/symfony"
585-
xsi:schemaLocation="http://symfony.com/schema/dic/services
586-
https://symfony.com/schema/dic/services/services-1.0.xsd
587-
http://symfony.com/schema/dic/symfony
588-
https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
589-
590-
<framework:config>
591-
<framework:form legacy-error-messages="false"/>
592-
</framework:config>
593-
</container>
594-
595-
.. code-block:: php
596-
597-
// config/packages/framework.php
598-
use Symfony\Config\FrameworkConfig;
599-
600-
return static function (FrameworkConfig $framework) {
601-
$framework->form()->legacyErrorMessages(false);
602-
};
603-
604562
Other Common Form Features
605563
--------------------------
606564

0 commit comments

Comments
 (0)