Skip to content

Commit bd65c3c

Browse files
committed
feature #4673 [Reference] add validation config reference section (xabbuh)
This PR was merged into the 2.3 branch. Discussion ---------- [Reference] add validation config reference section | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | Commits ------- 79ad3b5 add validation config reference section
2 parents 55a32cf + 79ad3b5 commit bd65c3c

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

reference/configuration/framework.rst

+34
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ Configuration
4848
* `translator`_
4949
* :ref:`enabled <translator.enabled>`
5050
* `fallback`_
51+
* `validation`_
52+
* `cache`_
53+
* `enable_annotations`_
54+
* `translation_domain`_
5155

5256
secret
5357
~~~~~~
@@ -517,6 +521,35 @@ This option is used when the translation key for the current locale wasn't found
517521

518522
For more details, see :doc:`/book/translation`.
519523

524+
validation
525+
~~~~~~~~~~
526+
527+
cache
528+
.....
529+
530+
**type**: ``string``
531+
532+
This value is used to determine the service that is used to persist class
533+
metadata in a cache. The actual service name is built by prefix the configured
534+
value with ``validator.mapping.cache.`` (e.g. if the value is ``apc``, the
535+
``validator.mapping.cache.apc`` service will be injected). The service has
536+
to implement the :class:`Symfony\\Component\\Validator\\Mapping\\Cache\\CacheInterface`.
537+
538+
enable_annotations
539+
..................
540+
541+
**type**: ``Boolean`` **default**: ``false``
542+
543+
If this option is enabled, validation constraints can be defined using annotations.
544+
545+
translation_domain
546+
..................
547+
548+
**type**: ``string`` **default**: ``validators``
549+
550+
The translation domain that is used when translating validation constraint
551+
error messages.
552+
520553
Full default Configuration
521554
--------------------------
522555

@@ -646,3 +679,4 @@ Full default Configuration
646679
647680
.. _`protocol-relative`: http://tools.ietf.org/html/rfc3986#section-4.2
648681
.. _`PhpStormOpener`: https://github.com/pinepain/PhpStormOpener
682+
.. _`egulias/email-validator`: https://github.com/egulias/EmailValidator

0 commit comments

Comments
 (0)