Skip to content

Commit c414231

Browse files
author
Stanislav Idolov
authored
Fix logical error with email validation
1 parent 906d44b commit c414231

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ protected function validateGuestSubscription()
101101
protected function validateEmailFormat($email)
102102
{
103103
$validator = new \Zend\Validator\EmailAddress();
104-
if ($validator->isValid($email)) {
104+
if (!$validator->isValid($email)) {
105105
throw new \Magento\Framework\Exception\LocalizedException(__('Please enter a valid email address.'));
106106
}
107107
}

0 commit comments

Comments
 (0)