Laravel Email Validation Using Regex Example

Hello artisan

In this laravel email validation tutorial, i will show you email validation example. To validate email in laravel, i will use regex. So this regex email validation example, you will learn how to validation email in laravel in a good way.

In this laravel email validation emample, first i will simply validate email in our html input tag, then i will validate this requested email in server side using regex. So you will learn regex email validation from this tutorial.

First html validation:

 

Now you can validate email in your controller like:

$request->validate([
 'email' => 'required|regex:/(.+)@(.+)\.(.+)/i'
]);

 

Read also: Regex Strong Password Validation Example in Laravel

 

Hope it can help you.

 

Facebook Github
A web enthusiastic, a self-motivated full-stack software engineer from Dhaka, Bangladesh with experience in developing applications using Laravel , React and Vue js