SteveCove
4 months ago
138
4
General

Laravel 5.8 override email validation / use 5.7 rules

Posted 4 months ago by SteveCove

So i have just discovered that laravel 5.8 uses a new email validation rule, that is technically correct, but functionally useless for our app.

The short version is that [email protected] is technically a valid email:

https://github.com/laravel/ideas/issues/1555

So laravel 5.8 lets this through. Our app uses mailgun, which throws an exception when encountering these emails.

I realize we can create a custom validation rule, and update all our validators to use this instead, but then we have to remind all developers not to use the built in, familiar, documented 'email' validation rule, which feels wrong.

I would prefer to overwrite this new behavior, but am not sure where to start

Please sign in or create an account to participate in this conversation.