3 ms·
You are correct: >>> from django.core.validators import EmailValidator >>> EmailValidator()(""""()<>[]:,;@\\\"!#$%&'-/=?^_`{}| ~.a"(is)@(valid)example.org(
by Programmatic 10y ago
You are correct:
>>> from django.core.validators import EmailValidator
>>> EmailValidator()(""""()<>[]:,;@\\\"!#$%&'-/=?^_`{}| ~.a"(is)@(valid)example.org(honest)""")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/django/core/validators.py", line 203, in __call__
raise ValidationError(self.message, code=self.code)
django.core.exceptions.ValidationError
- wtbob 10y agoWell shoot, that's my email address! /s Seriously, though, this is why regexp-based validation is Not Even Wrong. It's like showing up to a gunfight with a keen eye for detail.