On a pull request that proposes to tighten the validation of EmailValidator [0], Ned Batchelder questioned the usefulness of this:
"Can I respectfully suggest that continuing to tweak this complex regex to get asymptotically closer to perfection is not worth it? Especially to fix false positives. What real-world problem is happening because "gmail.-com" is accepted? "gmail.ccomm" is also accepted, but is just as useless as an email address." Collin Anderson proposed: "I think we should try to just match the standard html <input type="email"> validation. I'd imagine that most uses cases would want to match that. We might be able to use the regex verbatim from the standard itself: https://html.spec.whatwg.org/multipage/forms.html#e-mail-state-(type=email) If people want to allow things outside of that they could use a custom regex. Though it gets more complicated when considering Unicode. Unicode needs to get normalized to ascii before running through the official regex." (Of course, this may be somewhat backwards-incompatible.) What are your thoughts on this? I don't mind putting a halt to enhancements to the validation as long as we can articulate a sensible policy in the documentation. [0] https://github.com/django/django/pull/5612 -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/eb04034e-ea07-489f-aaf9-a08a5d241c4b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.