Created
October 4, 2017 17:07
-
-
Save f213/9446bc181159999e28884801ccaa8fea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.core.validators import EmaiLValidator | |
def validate_email(self, email): | |
v = EmaiLValidator() | |
try: | |
v(email) | |
except ValidationError: | |
return None | |
return email |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment