On Mon, Mar 14, 2016 at 12:34:40PM -0700, Florian Apolloner wrote:
On Monday, March 14, 2016 at 8:08:09 PM UTC+1, Michael Manfre wrote:Simple is better. Anyone who needs/wants something more complex is not prevented by Django from doing so.+1 to that and what the rest said ;)
+1 As mentioned already on the PR, I'd go with the HTML5 validator. That way we at least don't invent another standard. WRT the backwards compatibility issues: 1) You might be able to submit an email address that passes the new regex but not the old one. --> not an issue from my perspective 2) You're not able to submit an email address that does not pass the new validator but the old one. --> Unlikely, but when the new field is of type="email" your rather modern browser will tell you before Django anyway /Markus
Regards, Michael Manfre On Mon, Mar 14, 2016 at 2:31 PM, Aymeric Augustin < aymeric....@polytechnique.org <javascript:>> wrote:Indeed, for some reason, the URL and email validators get anywhere from 2 to 8 changes in every Django version, and there’s no end in sight. (I contributed to this. Sorry.) Like James, I’m in favor of making the validation much more simple and documenting it. This seems better than perpetually modifying it at the risk of introducing regressions. -- Aymeric. On 14 Mar 2016, at 19:17, James Bennett <ubern...@gmail.com <javascript:>> wrote: Personally I've long been in favor of drastically simplifying the email regex and essentially telling people that if they want to support triply-nested comments in a bang-path address they can write their own :) Is there an actual compelling reason to not just pare it down to "word characters and/or some punctuation, followed by an @, followed by some more word characters and/or punctuation"? On Mon, Mar 14, 2016 at 11:09 AM, Tim Graham <timog...@gmail.com <javascript:>> wrote: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-develop...@googlegroups.com <javascript:>. To post to this group, send email to django-d...@googlegroups.com <javascript:>. 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 <https://groups.google.com/d/msgid/django-developers/eb04034e-ea07-489f-aaf9-a08a5d241c4b%40googlegroups.com?utm_medium=email&utm_source=footer> . For more options, visit https://groups.google.com/d/optout.-- 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-develop...@googlegroups.com <javascript:>. To post to this group, send email to django-d...@googlegroups.com <javascript:>. 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/CAL13Cg8L6Gduwv4n%2BD68YqjEOmE1KWCKPPGnXjQr%2BR6a1HSSsA%40mail.gmail.com <https://groups.google.com/d/msgid/django-developers/CAL13Cg8L6Gduwv4n%2BD68YqjEOmE1KWCKPPGnXjQr%2BR6a1HSSsA%40mail.gmail.com?utm_medium=email&utm_source=footer> . For more options, visit https://groups.google.com/d/optout. -- 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-develop...@googlegroups.com <javascript:>. To post to this group, send email to django-d...@googlegroups.com <javascript:>. 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/EB89DAC8-7D6F-4A9E-B3F2-476E6EE1F377%40polytechnique.org <https://groups.google.com/d/msgid/django-developers/EB89DAC8-7D6F-4A9E-B3F2-476E6EE1F377%40polytechnique.org?utm_medium=email&utm_source=footer> . For more options, visit https://groups.google.com/d/optout.-- 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/c6d9ac2a-bb67-4a41-93bc-a1220d14e1c2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
-- -- 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/20160315025150.GC31079%40pyler.local. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: PGP signature