In Laravel, how do I validate an email address and force it to have a suffix like g.go.edu
?
How to validate a email address domain in Laravel?
Asked Answered
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 email –
Crabber
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'];
© 2022 - 2024 — McMap. All rights reserved.