How to validate a email address domain in Laravel?
Asked Answered
O

1

5

In Laravel, how do I validate an email address and force it to have a suffix like g.go.edu?

Otolaryngology answered 18/4, 2015 at 17:49 Comment(3)
Are you using laravel 4 or 5? You can't be using both...Rawley
I have reworded the question and title to make it easier to read.Eng
Does this answer your question? Laravel:custom validation for emailCrabber
F
9

If you want to accept all emails that have suffix g.go.edu, you can use as rule both email and regex rules, for example:

$rules['email'] = ['email', 'regex:/(.*)g\.go\.edu$/i'];
Flyblown answered 18/4, 2015 at 18:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.