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
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/68879


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
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