Support the ongoing development of Laravel.io →
Validation Forms
Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

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...

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Kyslik kyslik Joined 23 Jul 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.