Skip to content

Error 500 if "framework.validation.email_validation_mode" is set to "html5-allow-no-tld" #60352

Closed
@emmanuel-nz

Description

@emmanuel-nz

Symfony version(s) affected

7.2.5

Description

According to the docs (https://symfony.com/doc/current/reference/configuration/framework.html#email-validation-mode), the default validation mode can be changed to one of the values supported by the email validator, which are (according to this page: https://symfony.com/doc/current/reference/constraints/Email.html#mode) html5, html5-allow-no-tld, strict.

But when I try to change the default value to html5-allow-no-tld, I get a 500 error with this message:

The value "html5-allow-no-tld" is not allowed for path "framework.validation.email_validation_mode". Permissible values: "html5", "loose", "strict"

I think there is probably a mismatch between the values expected by the validator and the ones allowed by the framework config.

How to reproduce

Change the framework.validation.email_validation_mode config to html5-allow-no-tld.

Possible Solution

I believe this line might be the problem:

->enumNode('email_validation_mode')->values(['html5', 'loose', 'strict'])->defaultValue('html5')->end()

Additional Context

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      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