From 485d57e202517de19b15f4abcf265ded6e3b0dce Mon Sep 17 00:00:00 2001 From: Guillem Fondin Date: Mon, 17 Oct 2022 19:13:28 +0200 Subject: [PATCH] [Validator] Email - new `allow-no-tld` mode --- reference/constraints/Email.rst | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/reference/constraints/Email.rst b/reference/constraints/Email.rst index 85bbcb00be2..3dc98946638 100644 --- a/reference/constraints/Email.rst +++ b/reference/constraints/Email.rst @@ -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 `; 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 ` configuration option. pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy