Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
[Reference] document the2.5 validation options#4682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -55,6 +55,8 @@ Configuration | ||
| * `cache`_ | ||
| * `enable_annotations`_ | ||
| * `translation_domain`_ | ||
| * `strict_email`_ | ||
| * `api`_ | ||
| secret | ||
| ~~~~~~ | ||
| @@ -531,11 +533,8 @@ cache | ||
| **type**: ``string`` | ||
| The service that is used to persist class metadata in a cache. The service | ||
| has to implement the :class:`Symfony\\Component\\Validator\\Mapping\\Cache\\CacheInterface`. | ||
| enable_annotations | ||
| .................. | ||
| @@ -552,6 +551,41 @@ translation_domain | ||
| The translation domain that is used when translating validation constraint | ||
| error messages. | ||
| strict_email | ||
| ............ | ||
| .. versionadded:: 2.5 | ||
| The ``strict_email`` option was introduced in Symfony 2.5. | ||
| **type**: ``Boolean`` **default**: ``false`` | ||
| If this option is enabled, the `egulias/email-validator`_ library will be | ||
| used by the :doc:`/reference/constraints/Email` constraint validator. Otherwise, | ||
| the validator uses a simple regular expression to validate email addresses. | ||
| api | ||
MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. We should later on add a reference to the cookbook article about the new validation API that is still to be written (see#4094). | ||
| ... | ||
| .. versionadded:: 2.5 | ||
| The ``api`` option was introduced in Symfony 2.5. | ||
| **type**: ``string`` | ||
| Starting with Symfony 2.5, the Validator component introduced a new validation | ||
| API. The ``api`` option is used to switch between the different implementations: | ||
| ``2.4`` | ||
| Use the vaidation API that is compatible with older Symfony versions. | ||
| ``2.5`` | ||
| Use the validation API introduced in Symfony 2.5. | ||
| ``2.5-bc`` or ``auto`` | ||
| If you omit a value or set the ``api`` option to ``2.5-bc`` or ``auto``, | ||
| Symfony will use an API implementation that is compatible with both the | ||
| legacy implementation and the ``2.5`` implementation. You have to use | ||
| PHP 5.3.9 or higher to be able to use this implementation. | ||
| Full default Configuration | ||
| -------------------------- | ||