From 02710e3dac386d0af9bd0941393d8abaa6db4f9c Mon Sep 17 00:00:00 2001 From: Dinduks Date: Sat, 9 Jun 2012 12:35:22 +0200 Subject: [PATCH 1/2] Add doc for the checkHost email constraint (#1414) --- reference/constraints/Email.rst | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/reference/constraints/Email.rst b/reference/constraints/Email.rst index ed549978b99..a16b83d3033 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,14 @@ 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 +.. _`checkdnsrr`: http://www.php.net/manual/en/function.checkdnsrr.php + +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 From 3be021b2933fa2d96d09a34e467a3c63cad34df7 Mon Sep 17 00:00:00 2001 From: Dinduks Date: Sat, 9 Jun 2012 16:07:45 +0200 Subject: [PATCH 2/2] Remove a duplicated line --- reference/constraints/Email.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/reference/constraints/Email.rst b/reference/constraints/Email.rst index a16b83d3033..ba5930adfa2 100644 --- a/reference/constraints/Email.rst +++ b/reference/constraints/Email.rst @@ -9,7 +9,7 @@ cast to a string before being validated. +----------------+---------------------------------------------------------------------+ | Options | - `message`_ | | | - `checkMX`_ | -| | - `checkHost`_ | +| | - `checkHost`_ | +----------------+---------------------------------------------------------------------+ | Class | :class:`Symfony\\Component\\Validator\\Constraints\\Email` | +----------------+---------------------------------------------------------------------+ @@ -84,8 +84,6 @@ 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 - checkHost ~~~~~~~~~