[BUGFIX] Form email validation is case sensitive
[Packages/TYPO3.CMS.git] / typo3 / sysext / form / Classes / Validation / EmailValidator.php
index e5ae2ce..0b8f490 100644 (file)
@@ -40,7 +40,7 @@ class EmailValidator extends \TYPO3\CMS\Form\Validation\AbstractValidator {
        public function isValid() {
                if ($this->requestHandler->has($this->fieldName)) {
                        $value = $this->requestHandler->getByMethod($this->fieldName);
-                       if (!preg_match('/^(?:(?#local-part)(?#quoted)"[^\\"]*"|(?#non-quoted)[a-z0-9&+_-](?:\\.?[a-z0-9&+_-]+)*)@(?:(?#domain)(?#domain-name)[a-z0-9](?:[a-z0-9-]*[a-z0-9])*(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])*)*|(?#ip)(\\[)?(?:[01]?\\d?\\d|2[0-4]\\d|25[0-5])(?:\\.(?:[01]?\\d?\\d|2[0-4]\\d|25[0-5])){3}(?(1)\\]|))$/', $value)) {
+                       if (!\TYPO3\CMS\Core\Utility\GeneralUtility::validEmail($value)) {
                                return FALSE;
                        }
                }