Apply DNS and RFC Validation to Emails in Laravel
In this lesson, we will see how to apply DNS and RFC validation to emails in Laravel, the default email validator does not check for the presence of the domain and can detect this string 'test@gmail' as a valid email even though the string does not contain a domain.
Solving the problem
Laravel offers a DNS validator to solve this kind of problem all you need to do is validate the email address using the code below:
'email' => 'email:rfc,dns'