Slight Better Email Validator In Laravel

99% of the web forms in the wild have an input for emails but sadly most of the times you will either get spam or geprish emails, so
– how do you protect your self against those ?

i usually use the mailgun Api to validate emails on the client side b4 making the request to the server, but
– what if the user has disabled the execution of javascripts in their browser ?

so i thought why not make a validation rule that does the same as the frontEnd using mailgun or any other api to validate the coming emails b4 saving it to the db & so the package email-validator was born 😍.

basically all it does is make a request to the api and return either valid or not and to use it, you simply add isValid to your email validation rule.

'email' => 'required|email|isValid'

 

- atm the package support 3 services

Mailgun Api.
Egulias EmailValidator.
Validator.pizza

but if you know any other good alternatives, tell me and i will add it or better yet send me a PR 🤙.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s