@@ -559,48 +559,6 @@ To see the second approach - adding constraints to the form - and to
559559learn 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-
604562Other Common Form Features
605563--------------------------
606564
0 commit comments