Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Validator] - EmailConstraint reference #3469

Merged
merged 8 commits into from
Apr 2, 2014
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,17 @@ Basic Usage
Options
-------

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be placed before the headline. So you get something like:

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

strict


strict
~~~~~~

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

When false, the email will be validated against a simple Regular Expression.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd use lowercased "regular expression"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which is the core devs opinion on this?

If true, then the `egulias/email-validator`_ library is required to perform an RFC compilant validation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compliant


message
~~~~~~~

Expand All @@ -112,3 +124,6 @@ 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.


.. _EmailValidator: https://packagist.org/packages/egulias/email-validator
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The label has to be the text used in the paragraph above.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that was my mistake, sorry @egulias :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, now you did the wrong change. You should have changed this, not the label in the text.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You want to leave the string as egulias/email-validator then, I thought it was cleaner leaving the class name. I'll change it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's great. egulias/email-validator is really better as we are talking about the library.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok thank you! And sorry that you need to do so much changes :)