Any thoughts about whether or not to make similar simplifications to URLValidator? There's an old ticket to add a DomainNameValidator [0] which may or may not be worth moving forward with based on the decision.
[0] https://code.djangoproject.com/ticket/18119 On Saturday, April 2, 2016 at 3:05:14 AM UTC-4, Shai Berger wrote: > > On Saturday 02 April 2016 09:44:54 Josh Smeaton wrote: > > For what reason Zach? > > There is only one reason for which a strict and accurate validation is > required, as far as I can see, and that is if your application is not just > using existing email addresses (i.e. sending mail to users) but actually > manages them (i.e. creates mail addresses). > > Such applications are few and far between... > > > Without a canonical regex implementation to copy or > > include, we're stuck poorly reimplementing a bunch of esoteric rules to > > what end? The main purpose of email validation is to provide relevant > > feedback to the user, and to guard against obviously bad or malicious > data. > > "Looks vaguely like an email address" is probably too loose to be > useful, I > > admit. The proposal to copy the regex from the html5 email input widget > > seems like a fine compromise to me. > > > > We should also err on the side of allowing incorrect addresses rather > than > > rejecting correct addresses. I'd much rather have bad signups that need > to > > be done again rather than users that can't sign up with their valid > > addresses. > > > > ...and their needs should not imply a high burden of maintenance on the > rest > of the community; they can and should implement their own validation. > > +1 everything Josh said. > > Shai. > -- 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/78fa8f53-2639-4cde-b86f-b0294f7d1a83%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.