no more invalid or disposable emails in your database.
- Run
pip install django-email-validators - Add
django_email_validatorstosettings.INSTALLED_APPS - Restart your application server
- ๐๏ธ
validate_email_non_disposable - ๐
validate_email_mx - โ๏ธ
validate_email_provider_typo
Validates that the email is not from a disposable email provider (fast, offline check).
Validates that the email domain has valid MX records (slow, requires network access).
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
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, ] )# 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 pytestReleased under MIT License.
- โญ Star this project on GitHub
Follow me on GitHub- ๐ Follow me on Bluesky
- ๐ฐ Sponsor me on Github
-
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. ๐งโโ๏ธ