Well, yes. It's a valid email structure... Which is passing validation. Whether it's a valid, existing email address is a different matter. In which case, I'd suggest no it's not.
This kind of validation goes beyond general email validation and falls under 'does the email actually exist' validation. Which is a different matter.
Yes, I've solved it using try {}
try
{
$this->mc->lists->subscribe($list_id, ['email' => $email]);
}
catch (\Mailchimp_Error $e)
{
if ($e->getCode() == '214') return '214';
elseif ($e->getCode() == '-100') return '-100';
else throw $e;
}
code above is in event, I just don't like that I have to take care of "validation" like this; known errors from mailchimp are send back to controller...
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community