Frameworks and SDKs
Laravel Forge email validation integration
On a Laravel Forge site, our Laravel validation rule rejects an address that cannot receive email in any form request. The key goes in the site’s Environment panel, never in your repository, and the rule lets the form through when the check cannot finish.
Read the full setup guideGet an API key
- Setup guide
- The key in Forge’s Environment panel
EV_API_KEY=your-api-key
# optional
EV_BLOCK_DISPOSABLE=trueAt a glance.
- Status
- Setup guide. Not listed on a marketplace yet: you set it up yourself in a few steps, below and in the full guide.
- For
- Laravel developers who deploy with Forge and want sign-up and contact forms to refuse addresses that cannot receive mail.
- You need
- A Laravel app on a Forge site, Laravel 10 or newer and PHP 8.1 or newer, and an API key made for it, with a daily credit cap.
- Costs
- 1 credit = 1 validated address, as with any API request. Free: unknown results, API errors, malformed addresses, test addresses on sandbox.email-validation.org, addresses on reserved domains such as example.com and, in a bulk list, repeats of an address (charged once).
- Full guide
- Read the full setup guide
Typical uses.
Sign-ups that can be reached
The rule fails an address that cannot receive mail, with Laravel’s usual error message, before the account is made.
No throwaway inboxes
One environment setting makes it reject disposable addresses too.
Never a lost visitor
When the check cannot finish, the address passes and a warning goes to your log, unless you choose otherwise.
Set it up. 3 steps.
The short version of the full setup guide, which stays the reference when a step does not match what you see.
Add the package
Commit our Laravel package with your app as its guide says, and add the rule to your form requests.
Add the key in Forge
In the site’s Settings, Environment, add
EV_API_KEY, and let Forge run config:cache.Test
Send the form with a free test address: one that has no mailbox fails, one that is accepted passes.
Good to know.
Forge adds nothing of its own: the rule runs in your app, and Forge keeps the key in the site’s .env file.
Each result is cached for an hour in your app’s cache, under a hash of the address, never the address.
For EU data residency, set
EV_BASE_URLto the EU host in the same panel.
Connect Laravel Forge.
Test it on our sandbox addresses for free, then on your own contacts.
Updated · Maintained by: Email Validation LLC