# Laravel Integration: Email Validation

URL: https://email-validation.org/integrations/laravel/
Updated: 2026-11-06

> Documentation index: https://email-validation.org/llms.txt

A Laravel validation rule, ValidEmail, fails an address that cannot receive email in any form request or Validator::make call. It is built on our PHP client library, checks each address once, and lets a real person through when the API cannot answer in time.

[Read the full setup guide](https://email-validation.org/docs/guides/laravel/) [Get an API key](https://email-validation.org/signin/)

- Status: Setup guide
- One rule after Laravel’s email rule

**Form request** PHP

Install and use

```text
composer config repositories.email-validation-laravel artifact ./packages
composer require email-validation/laravel:^0.1

# .env
EV_API_KEY=your-api-key

# in your validation rules
'email' => ['bail', 'required', 'email', new ValidEmail()],
'email' => 'bail|required|email|valid_email:invalid,disposable',
```

## At 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 want sign-up, checkout and contact forms to refuse addresses that cannot receive mail, without a slow or failed check ever blocking a real person.
- **You need**: Laravel 10 or newer, PHP 8.1 or newer, Composer, and an [API key](https://email-validation.org/app/api-keys/) made for it, with a [daily credit cap](https://email-validation.org/docs/authentication/#limits), with the permission Validate addresses, set as `EV_API_KEY` in `.env`.
- **Costs**: 1 credit = 1 validated address, as with any API request. Free: unknown results, API errors, malformed addresses and test addresses on sandbox.email-validation.org.
- **Full guide**: [Read the full setup guide](https://email-validation.org/docs/guides/laravel/)

## Typical uses.

- **Block bad sign-ups**: Add the rule after email on a sign-up form: an address with no mailbox fails the field with a message, and the person can fix a typo and send the form again.
- **Choose what fails**: Only `invalid` fails by default. Pass `failOn: ['invalid', 'disposable']`, or set `EV_BLOCK_DISPOSABLE=true`, to refuse throwaway addresses too; `catch_all` and `unknown` pass unless you add them.
- **Strict or forgiving**: By default an address passes when the check cannot finish, and a warning goes to your log. Set `EV_FAIL_OPEN=false`, or `failOpen: false` on one rule, to fail the field with “We could not check the email right now” instead.

## Set it up. 5 steps.

The short version of the [full setup guide](https://email-validation.org/docs/guides/laravel/), which stays the reference when a step does not match what you see.

1. **Download the package**: The package is not on Packagist yet: download it from the guide and save it in a folder of your project, such as packages/.
2. **Require it**: Add that folder as a Composer repository with `composer config repositories.email-validation-laravel artifact ./packages`, then run `composer require email-validation/laravel:^0.1`. Laravel discovers the service provider by itself.
3. **Set your key**: Create an API key with Validate addresses and a daily credit cap, and put it in `.env` as `EV_API_KEY`. The key is read from your configuration only; never put it in code.
4. **Add the rule**: Add `new ValidEmail()`, or the string rule `valid_email`, after Laravel’s own `email` rule, with `bail` so a malformed address is never sent.
5. **Try it for free**: Send the form with `accepted@sandbox.email-validation.org`, which passes, and `no_mailbox@sandbox.email-validation.org`, which fails. Test addresses cost nothing.

## Good to know.

- The rule gives the API 5 seconds for the check and waits 8 seconds for the answer, without retrying: a slow mail server then answers unknown, which passes and is free.
- Each result is kept in your cache for an hour under a SHA-256 hash of the address, so a form sent again after fixing another field is not checked or charged again. Only the status is kept, never the address, and unknown results are not kept.
- Publish the settings with `php artisan vendor:publish --tag=email-validation-config`, and the messages with `--tag=email-validation-lang` to change or translate them. The messages never show the API’s own error text.
- A warning in your log carries the error code and the request id, never the address.
- For [EU data residency](https://email-validation.org/docs/eu-data-residency/), set `EV_BASE_URL=https://api-eu.email-validation.org`: the same key works on both.

## Related

- [The full Laravel setup guide](https://email-validation.org/docs/guides/laravel/)
- [Validating sign-up forms: what to block and what to accept](https://email-validation.org/docs/guides/signup-form-validation/)
- [Every setting of the rule](https://email-validation.org/docs/guides/laravel/#settings)
- [The PHP client library, for bulk lists and other calls](https://email-validation.org/docs/sdks/php/)
- [All integrations](https://email-validation.org/integrations/)
