- π©πͺGermany tstoeckler Essen, Germany
So as far as I can tell the following is true:
- We have an
email.validator
service that uses egulias' one but does not perform strict validation (it usesRFCValidation()
) - Email form elements use this service
- Email fields do not use the core service but the Symfony constraint which also uses egulias' validator but does perform strict validation (it uses
NoRFCWarningsValidation()
)
The discrepancy between form elements and fields is already very unfortunate in my opinion in it's own right. It get's worse, though, because of the fact that on site install the site email (form element) is used as the user 1 email (field). Thus, you can currently install Drupal using
foo@localhost
as a site (+ user 1) email, but that leaves user 1 in an invalid state. In particular, you cannot submit the user 1 profile form (without changing the email to something else).As far as I can tell, the decision to prefer strict validation in core has already been made by #3307736: EmailValidator defaults to 'loose' mode which is deprecated in Symfony 6.2 β so I think the solution would be to just make the
email.validator
service use strict validation, as well, but holding off on the title and issue summary and the re-classifying as a bug until some confirmation on the proposed the resolution. - We have an