5

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

Sheepy
  • 17,324
  • 4
  • 45
  • 69
Witairsturs
  • 51
  • 1
  • 2

1 Answers1

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'];
Marcin Nabiałek
  • 109,655
  • 42
  • 258
  • 291