Skip to content

Commit 7c463b8

Browse files
committed
update Magento/Nesletter
1 parent dd8f43c commit 7c463b8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/code/Magento/Newsletter/Controller/Subscriber/NewAction.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ protected function validateGuestSubscription()
100100
*/
101101
protected function validateEmailFormat($email)
102102
{
103-
if (!\Zend_Validate::is($email, 'EmailAddress')) {
103+
$validator = new \Zend\Validator\EmailAddress();
104+
if ($validator->isValid($email)) {
104105
throw new \Magento\Framework\Exception\LocalizedException(__('Please enter a valid email address.'));
105106
}
106107
}

0 commit comments

Comments
 (0)