Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Validator] Email - newallow-no-tld mode#17360

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Changes fromall 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
11 changes: 8 additions & 3 deletionsreference/constraints/Email.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -109,19 +109,24 @@ This option defines the pattern used to validate the email address. Valid values
* ``loose`` uses a simple regular expression (just checks that at least one ``@``
character is present, etc.). This validation is too simple and it's recommended
to use one of the other modes instead;
* ``html5`` uses the same regular expression as the `HTML5 email input element`_,
making the backend validation consistent with the one provided by browsers;
* ``html5`` uses the regular expression of the `HTML5 email input element`_,
except it enforces a tld to be present.
* ``html5-allow-no-tld`` uses exactly the same regular expression as the `HTML5 email input element`_,
making the backend validation consistent with the one provided by browsers.
* ``strict`` validates the address according to `RFC 5322`_ using the
`egulias/email-validator`_ library (which is already installed when using
:doc:`Symfony Mailer </mailer>`; otherwise, you must install it separately).

.. versionadded:: 6.2

The ``html5-allow-no-tld`` mode was introduced in 6.2.

.. tip::

The possible values of this option are also defined as PHP constants of
:class:`Symfony\\Component\\Validator\\Constraints\\Email`
(e.g. ``Email::VALIDATION_MODE_STRICT``).


The default value used by this option is set in the
:ref:`framework.validation.email_validation_mode <reference-validation-email_validation_mode>`
configuration option.
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp