Skip to content

Commit

Permalink
feature #3469 [Validator] - EmailConstraint reference (egulias)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
weaverryan committed Apr 2, 2014
2 parents ec3aaca + 257c483 commit c062d81
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion reference/constraints/Email.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ cast to a string before being validated.
+----------------+---------------------------------------------------------------------+
| Applies to | :ref:`property or method <validation-property-target>` |
+----------------+---------------------------------------------------------------------+
| Options | - `message`_ |
| Options | - `strict`_ |
| | - `message`_ |
| | - `checkMX`_ |
| | - `checkHost`_ |
+----------------+---------------------------------------------------------------------+
Expand Down Expand Up @@ -89,6 +90,18 @@ Basic Usage
Options
-------

.. versionadded:: 2.5
The ``strict`` option was introduced in Symfony 2.5.

strict
~~~~~~

**type**: ``boolean`` **default**: ``false``

When false, the email will be validated against a simple regular expression.
If true, then the `egulias/email-validator`_ library is required to perform
an RFC compliant validation.

message
~~~~~~~

Expand All @@ -112,3 +125,5 @@ checkHost
If true, then the :phpfunction:`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.

.. _egulias/email-validator: https://packagist.org/packages/egulias/email-validator

0 comments on commit c062d81

Please sign in to comment.