Commit b8dac1ae authored by Thomas Löffler's avatar Thomas Löffler Committed by Oliver Bartsch
Browse files

[TASK] Optimize GeneralUtility::validEmail()

With multiple registered email validators, stop as soon
as the first one fails.

Resolves: #93890
Releases: master
Change-Id: I1e9e20a57ddb5538595aa0a9dea2888d547bc78e

Tested-by: core-ci's avatarcore-ci <>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <>
Tested-by: Christian Kuhn's avatarChristian Kuhn <>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <>
parent 0c4ec857
......@@ -817,7 +817,7 @@ class GeneralUtility
$validators[] = $validator;
return (new EmailValidator())->isValid($email, new MultipleValidationWithAnd($validators));
return (new EmailValidator())->isValid($email, new MultipleValidationWithAnd($validators, MultipleValidationWithAnd::STOP_ON_ERROR));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment