diff --git a/reference/constraints/Email.rst b/reference/constraints/Email.rst index ed549978b99..ba5930adfa2 100644 --- a/reference/constraints/Email.rst +++ b/reference/constraints/Email.rst @@ -9,6 +9,7 @@ cast to a string before being validated. +----------------+---------------------------------------------------------------------+ | Options | - `message`_ | | | - `checkMX`_ | +| | - `checkHost`_ | +----------------+---------------------------------------------------------------------+ | Class | :class:`Symfony\\Component\\Validator\\Constraints\\Email` | +----------------+---------------------------------------------------------------------+ @@ -46,17 +47,17 @@ Basic Usage - + .. code-block:: php-annotations // src/Acme/BlogBundle/Entity/Author.php namespace Acme\BlogBundle\Entity; - + use Symfony\Component\Validator\Constraints as Assert; class Author { - /** + /** * @Assert\Email( * message = "The email '{{ value }}' is not a valid email.", * checkMX = true @@ -83,4 +84,12 @@ checkMX If true, then the `checkdnsrr`_ PHP function will be used to check the validity of the MX record of the host of the given email. -.. _`checkdnsrr`: http://www.php.net/manual/en/function.checkdnsrr.php \ No newline at end of file +checkHost +~~~~~~~~~ + +**type**: ``Boolean`` **default**: ``false`` + +If true, then the `checkdnsrr`_ PHP function will be used to check the validity +of the MX *or* the A *or* the AAAA record of the host of the given email. + +.. _`checkdnsrr`: http://www.php.net/manual/en/function.checkdnsrr.php