Skip to content

Commit c062d81

Browse files
committed
feature symfony#3469 [Validator] - EmailConstraint reference (egulias)
This PR was merged into the master branch. Discussion ---------- [Validator] - EmailConstraint reference | Q | A | ------------- | --- | Doc fix? | no | New docs? | yes - symfony/symfony#9140 | Applies to | master | Fixed tickets | Note ------ I'm not sure if this behaviour change should go in a page by itself (like https://github.com/symfony/symfony-docs/blob/2.4/components/dependency_injection/lazy_services.rst) since requires the installation of an external library to work. I appreciate some guide on this since it's my first doc PR, thanks. Commits ------- 257c483 Blank line restored c50f041 CS a0dd460 Lowercase and link label aa5aa61 Typo and link label 517e4c5 Link moved and heading updated f0b3b85 Version added and clarifications e4a0e2f Use of Sphinx markup faa034b [WIP][Valiadtor] - EmailConstraint reference
2 parents ec3aaca + 257c483 commit c062d81

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

reference/constraints/Email.rst

+16-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ cast to a string before being validated.
77
+----------------+---------------------------------------------------------------------+
88
| Applies to | :ref:`property or method <validation-property-target>` |
99
+----------------+---------------------------------------------------------------------+
10-
| Options | - `message`_ |
10+
| Options | - `strict`_ |
11+
| | - `message`_ |
1112
| | - `checkMX`_ |
1213
| | - `checkHost`_ |
1314
+----------------+---------------------------------------------------------------------+
@@ -89,6 +90,18 @@ Basic Usage
8990
Options
9091
-------
9192

93+
.. versionadded:: 2.5
94+
The ``strict`` option was introduced in Symfony 2.5.
95+
96+
strict
97+
~~~~~~
98+
99+
**type**: ``boolean`` **default**: ``false``
100+
101+
When false, the email will be validated against a simple regular expression.
102+
If true, then the `egulias/email-validator`_ library is required to perform
103+
an RFC compliant validation.
104+
92105
message
93106
~~~~~~~
94107

@@ -112,3 +125,5 @@ checkHost
112125
If true, then the :phpfunction:`checkdnsrr` PHP function will be used to
113126
check the validity of the MX *or* the A *or* the AAAA record of the host
114127
of the given email.
128+
129+
.. _egulias/email-validator: https://packagist.org/packages/egulias/email-validator

0 commit comments

Comments
 (0)