@@ -9,6 +9,7 @@ cast to a string before being validated.
9
9
+----------------+---------------------------------------------------------------------+
10
10
| Options | - `message `_ |
11
11
| | - `checkMX `_ |
12
+ | | - `checkHost `_ |
12
13
+----------------+---------------------------------------------------------------------+
13
14
| Class | :class: `Symfony\\ Component\\ Validator\\ Constraints\\ Email ` |
14
15
+----------------+---------------------------------------------------------------------+
@@ -46,17 +47,17 @@ Basic Usage
46
47
</property >
47
48
</class >
48
49
</constraint-mapping >
49
-
50
+
50
51
.. code-block :: php-annotations
51
52
52
53
// src/Acme/BlogBundle/Entity/Author.php
53
54
namespace Acme\BlogBundle\Entity;
54
-
55
+
55
56
use Symfony\Component\Validator\Constraints as Assert;
56
57
57
58
class Author
58
59
{
59
- /**
60
+ /**
60
61
* @Assert\Email(
61
62
* message = "The email '{{ value }}' is not a valid email.",
62
63
* checkMX = true
@@ -83,4 +84,14 @@ checkMX
83
84
If true, then the `checkdnsrr `_ PHP function will be used to check the validity
84
85
of the MX record of the host of the given email.
85
86
86
- .. _`checkdnsrr` : http://www.php.net/manual/en/function.checkdnsrr.php
87
+ .. _`checkdnsrr` : http://www.php.net/manual/en/function.checkdnsrr.php
88
+
89
+ checkHost
90
+ ~~~~~~~~~
91
+
92
+ **type **: ``Boolean `` **default **: ``false ``
93
+
94
+ If true, then the `checkdnsrr `_ PHP function will be used to check the validity
95
+ of the MX *or * the A *or * the AAAA record of the host of the given email.
96
+
97
+ .. _`checkdnsrr` : http://www.php.net/manual/en/function.checkdnsrr.php
0 commit comments