from django.core.exceptions import ValidationError
from django.core.validators import validate_email
value = "[email protected]"
try:
validate_email(value)
except ValidationError as e:
print("bad email, details:", e)
else:
print("good email")
More Related Contents:
- How to send email via Django?
- Django 1.8 sending mail using gmail SMTP
- Unexpected NoReverseMatch error when using include() in urls patterns
- Order of Serializer Validation in Django REST Framework
- creating a MIME email template with images to send with python / django
- “[Errno 101] Network is unreachable” when trying to send email using Django
- Remove non-ASCII characters from a string using python / django
- Django set default form values
- Creating a dynamic choice field
- H14 error in heroku – “no web processes running”
- Getting the SQL from a Django QuerySet [duplicate]
- Named regular expression group “(?Pregexp)”: what does “P” stand for?
- ImproperlyConfigured: You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings
- Django model “doesn’t declare an explicit app_label”
- Django Admin – change header ‘Django administration’ text
- How to duplicate virtualenv
- Get all related Django model objects
- Python re.sub question
- How to set-up a Django project with django-storages and Amazon S3, but with different folders for static files and media files?
- Django cannot find static files. Need a second pair of eyes, I’m going crazy
- How can I auto-populate a PDF form in Django/Python? [closed]
- Django: OperationalError No Such Table
- Bypass confirmation prompt for pip uninstall
- How to see the raw SQL queries Django is running?
- django – getlist()
- Pre-populate an inline FormSet?
- Python re infinite execution
- Running a specific test case in Django when your app has a tests directory
- Change a Django form field to a hidden field
- Issue with regex backreference in Python