# Django Integration: Email Validation

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

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

A validator, a form field and a model field for Django that fail an email address that cannot receive mail. They check each address once, and let a real person sign up when the API cannot answer in time.

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

- Status: Setup guide
- A Python package for your project

**A form field** forms.py

Python

```text
from django import forms
from email_validation_django import DeliverableEmailFormField

class SignupForm(forms.Form):
    email = DeliverableEmailFormField()
```

## 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**: Django developers who want sign-up, contact and checkout forms, and models saved through full\_clean(), to refuse the addresses that will bounce.
- **You need**: Django 4.2 or newer on Python 3.10 or newer, the package file from the guide, 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), set in your environment as `EV_API_KEY`.
- **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/django/)

## Typical uses.

- **A form field**: DeliverableEmailFormField is forms.EmailField plus the check, which runs once the format is right. A malformed address is refused by Django’s own check and never sent.
- **A model field**: DeliverableEmailField is models.EmailField, checked in full\_clean() and in model forms, so every model form that saves the field gets the check too.
- **The validator on any field**: Add validate\_email\_deliverable to any field’s validators, or a DeliverableEmailValidator with its own fail\_on statuses and messages, for example a stricter one for work addresses.

## Set it up. 5 steps.

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

1. **Download the package**: The package is not on PyPI yet: download the file from the guide, and commit it to your repository if you want it in your requirements.
2. **Install it**: Install the file into your project’s environment with `pip install` and its path; pip also installs Django and the Python client library. Nothing goes in `INSTALLED_APPS`.
3. **Set your key**: Create an API key with Validate addresses and a daily credit cap, and set it in your environment as `EV_API_KEY`, never in code.
4. **Use a field**: Use `DeliverableEmailFormField()` for a form’s email field, or `DeliverableEmailField()` for a model’s.
5. **Try it**: Submit `accepted@sandbox.email-validation.org`, which passes, and `no_mailbox@sandbox.email-validation.org`, which fails. Test addresses cost nothing.

## Good to know.

- Only `invalid` fails by default. Set `"BLOCK_DISPOSABLE": True` to fail `disposable` addresses as well; `catch_all` and `unknown` pass unless you add them to `FAIL_ON`.
- When the check cannot finish (a timeout, an unreachable API, a 5xx or 429 answer, no credits or no key), the address passes and a warning with the error code and request id goes to the package’s logger, never the address. Set `"FAIL_OPEN": False` to fail the field instead.
- Each result is kept in Django’s 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, and unknown results are not kept at all.
- The messages are translatable, and each error has a code for your templates or API responses: `email_invalid`, `email_disposable`, `email_catch_all`, `email_unknown` and `email_unavailable`.
- For [EU data residency](https://email-validation.org/docs/eu-data-residency/), set `"BASE_URL"` in `EMAIL_VALIDATION` to `https://api-eu.email-validation.org`: the same key works on both.

## Related

- [The full Django setup guide](https://email-validation.org/docs/guides/django/)
- [Every setting and its default](https://email-validation.org/docs/guides/django/#settings)
- [Validating sign-up forms: what to block and what to accept](https://email-validation.org/docs/guides/signup-form-validation/)
- [The Python client library, for other calls such as bulk lists](https://email-validation.org/docs/sdks/python/)
- [All integrations](https://email-validation.org/integrations/)
