In Laravel, how do I validate an email address and force it to have a suffix like g.go.edu
?
DNSCheckValidation: Will check if there are DNS records that signal that the server accepts emails.
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'];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With