Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7fc4d52

Browse files
committed
document the2.5 validation options
1 parent4d848d7 commit7fc4d52

File tree

1 file changed

+39
-5
lines changed

1 file changed

+39
-5
lines changed

‎reference/configuration/framework.rst‎

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ Configuration
5555
* `cache`_
5656
* `enable_annotations`_
5757
* `translation_domain`_
58+
* `strict_email`_
59+
* `api`_
5860

5961
secret
6062
~~~~~~
@@ -531,11 +533,8 @@ cache
531533

532534
**type**: ``string``
533535

534-
This value is used to determine the service that is used to persist class
535-
metadata in a cache. The actual service name is built by prefixing the configured
536-
value with ``validator.mapping.cache.`` (e.g. if the value is ``apc``, the
537-
``validator.mapping.cache.apc`` service will be injected). The service has
538-
to implement the:class:`Symfony\\Component\\Validator\\Mapping\\Cache\\CacheInterface`.
536+
The service that is used to persist class metadata in a cache. The service
537+
has to implement the:class:`Symfony\\Component\\Validator\\Mapping\\Cache\\CacheInterface`.
539538

540539
enable_annotations
541540
..................
@@ -552,6 +551,41 @@ translation_domain
552551
The translation domain that is used when translating validation constraint
553552
error messages.
554553

554+
strict_email
555+
............
556+
557+
..versionadded::2.5
558+
The ``strict_email`` option was introduced in Symfony 2.5.
559+
560+
**type**: ``Boolean`` **default**: ``false``
561+
562+
If this option is enabled, the `egulias/email-validator`_ library will be
563+
used by the:doc:`/reference/constraints/Email` constraint validator. Otherwise,
564+
the validator uses a simple regular expression to validate email addresses.
565+
566+
api
567+
...
568+
569+
..versionadded::2.5
570+
The ``api`` option was introduced in Symfony 2.5.
571+
572+
**type**: ``string``
573+
574+
Starting with Symfony 2.5, the Validator component introduced a new validation
575+
API. The ``api`` option is used to switch between the different implementations:
576+
577+
``2.4``
578+
Use the vaidation API that is compatible with older Symfony versions.
579+
580+
``2.5``
581+
Use the validation API introduced in Symfony 2.5.
582+
583+
``2.5-bc`` or ``auto``
584+
If you omit a value or set the ``api`` option to ``2.5-bc`` or ``auto``,
585+
Symfony will use an API implementation that is compatible with both the
586+
legacy implementation and the ``2.5`` implementation. You have to use
587+
PHP 5.3.9 or higher to be able to use this implementation.
588+
555589
Full default Configuration
556590
--------------------------
557591

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp