no more invalid or disposable emails in your database.
Project description
django-email-validators
no more invalid or disposable emails in your database.
Installation
- Run
pip install django-email-validators - Add
django_email_validatorstosettings.INSTALLED_APPS - Restart your application server
Usage
Validators
- 🗑️
validate_email_non_disposable - 🌐
validate_email_mx - ✍️
validate_email_provider_typo
validate_email_non_disposable
Validates that the email is not from a disposable email provider (fast, offline check).
validate_email_mx
Validates that the email domain has valid MX records (slow, requires network access).
validate_email_provider_typo
Validates that the email domain is not a likely typo of a common email provider. Checks a one-character diff against 80+ common providers and verifies the domain has no valid MX records (prevents false positives).
Examples that will be caught:
user@gmai.com-> suggestsuser@gmail.comuser@gmail.co-> suggestsuser@gmail.comuser@yahooo.com-> suggestsuser@yahoo.com
Usage
from django.db import models
from django_email_validators import (
validate_email_non_disposable,
validate_email_mx,
validate_email_provider_typo,
)
class User(models.Model):
email = models.EmailField(
validators=[
validate_email_non_disposable,
validate_email_mx,
validate_email_provider_typo,
]
)
Testing
# clone repository
git clone https://github.com/fabiocaccamo/django-email-validators.git && cd django-email-validators
# create virtualenv and activate it
python -m venv venv && . venv/bin/activate
# upgrade pip
python -m pip install --upgrade pip
# install requirements
pip install -r requirements.txt -r requirements-test.txt
# install pre-commit to run formatters and linters
pre-commit install --install-hooks
# run tests
tox
# or
pytest
License
Released under MIT License.
Supporting
- :star: Star this project on GitHub
- :octocat: Follow me on GitHub
- :blue_heart: Follow me on Bluesky
- :moneybag: Sponsor me on Github
See also
-
django-admin-interface- the default admin interface made customizable by the admin itself. popup windows replaced by modals. 🧙 ⚡ -
django-cache-cleaner- clear the entire cache or individual caches easily using the admin panel or management command. 🧹 -
django-colorfield- simple color field for models with a nice color-picker in the admin. 🎨 -
django-extra-settings- config and manage typed extra settings using just the django admin. ⚙️ -
django-maintenance-mode- shows a 503 error page when maintenance-mode is on. 🚧 🛠️ -
django-redirects- redirects with full control. ↪️ -
django-treenode- probably the best abstract model / admin for your tree based stuff. 🌳 -
python-benedict- dict subclass with keylist/keypath support, I/O shortcuts (base64, csv, json, pickle, plist, query-string, toml, xml, yaml) and many utilities. 📘 -
python-codicefiscale- encode/decode Italian fiscal codes - codifica/decodifica del Codice Fiscale. 🇮🇹 💳 -
python-fontbro- friendly font operations. 🧢 -
python-fsutil- file-system utilities for lazy devs. 🧟♂️
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_email_validators-0.2.0.tar.gz.
File metadata
- Download URL: django_email_validators-0.2.0.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db7b1e3dcb8dc2b5ab20889b52bdd0f2146d02e2d035328160951c00769ecf98
|
|
| MD5 |
73bb64b87572d063f790d588762013b0
|
|
| BLAKE2b-256 |
2e8ba745c1af393ff52b9d512fc75c9a9a6d8e3b64f714ecfd0258aad076c064
|
Provenance
The following attestation bundles were made for django_email_validators-0.2.0.tar.gz:
Publisher:
create-release.yml on fabiocaccamo/django-email-validators
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_email_validators-0.2.0.tar.gz -
Subject digest:
db7b1e3dcb8dc2b5ab20889b52bdd0f2146d02e2d035328160951c00769ecf98 - Sigstore transparency entry: 768750283
- Sigstore integration time:
-
Permalink:
fabiocaccamo/django-email-validators@cc55d489e73946e46eea9c9408613443d6682cc7 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/fabiocaccamo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
create-release.yml@cc55d489e73946e46eea9c9408613443d6682cc7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_email_validators-0.2.0-py3-none-any.whl.
File metadata
- Download URL: django_email_validators-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a58dd432171c72b62383ad005cd48f3a5e32f6a0df4552a2c9b878ddf08ba26f
|
|
| MD5 |
7505d5610463953d330872472c768f93
|
|
| BLAKE2b-256 |
b392b5df3ca5a83602bb773bc1c78ee98cd66543d79065a999054395df7698a1
|
Provenance
The following attestation bundles were made for django_email_validators-0.2.0-py3-none-any.whl:
Publisher:
create-release.yml on fabiocaccamo/django-email-validators
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_email_validators-0.2.0-py3-none-any.whl -
Subject digest:
a58dd432171c72b62383ad005cd48f3a5e32f6a0df4552a2c9b878ddf08ba26f - Sigstore transparency entry: 768750285
- Sigstore integration time:
-
Permalink:
fabiocaccamo/django-email-validators@cc55d489e73946e46eea9c9408613443d6682cc7 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/fabiocaccamo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
create-release.yml@cc55d489e73946e46eea9c9408613443d6682cc7 -
Trigger Event:
push
-
Statement type: