Re: [whatwg] Comments on the definition of a valid e-mail address

2009-08-31 Thread Thomas Broyer
On Mon, Aug 31, 2009 at 7:53 AM, Ian Hickson wrote: > If we let > >   X = [-a-zA-Z0-9!#$%&\'*+/=?^_`{|}~]+ > > ...then the regexp is: > >   ^X(\.X)*...@x(\.X)*$ > > I believe this is correct, yes. I used to have a mail address whose local part had both a leading and a trailing dot: .t...@wanadoo.f

Re: [whatwg] Comments on the definition of a valid e-mail address

2009-08-27 Thread Nils Dagsson Moskopp
Am Montag, den 24.08.2009, 16:33 -0400 schrieb Brian Campbell: > Given that there are so many technically invalid addresses that > actually do work to deliver mail, and that I'm sure some people have > odd addresses due to poor form validation […] Well, maybe the RFC should be updated as well

Re: [whatwg] Comments on the definition of a valid e-mail address

2009-08-24 Thread TAMURA, Kent
- domain-part should be [a-zA-Z0-9]+(\.[a-zA-Z0-9]+)+ Correction. "-" is allowed for domain-part. -- TAMURA Kent Software Engineer, Google

Re: [whatwg] Comments on the definition of a valid e-mail address

2009-08-24 Thread TAMURA, Kent
FYI. I was in Gmail team and wrote the email address validation code which we are currently using. Gmail's validation rules are: - require "@" - local-part should be - quoted-string without CFWS and FWS, or - 1*(atext / ".")This means dot-atom-text without "." restriction. This loosene

Re: [whatwg] Comments on the definition of a valid e-mail address

2009-08-24 Thread Brian Campbell
On Aug 24, 2009, at 3:24 PM, Aryeh Gregor wrote: Yup. If it is deliverable then surely it's an alias to the same address without the trailing dot, in which case a browser could choose to remove it. Yes, it's not possible for "example.com." to mean anything different from "example.com". (

Re: [whatwg] Comments on the definition of a valid e-mail address

2009-08-24 Thread Michelangelo De Simone
2009/8/24 Peter Kasting : > I am mentoring a student who is writing a patch for this in WebKit as we > speak -- we were just discussing the implementation yesterday and I believe > he hopes to have it out for review tomorrow. The mentored student has published the patch and is waiting for comment

Re: [whatwg] Comments on the definition of a valid e-mail address

2009-08-24 Thread Aryeh Gregor
On Mon, Aug 24, 2009 at 10:11 AM, Tab Atkins Jr. wrote: > Do these still have a normal TLD identifier before the trailing dot? > Or are they just *really* weird? None of the addresses had more than one thing wrong with it. These looked like perfectly normal addresses but with a trailing dot, like

Re: [whatwg] Comments on the definition of a valid e-mail address

2009-08-24 Thread Smylers
Aryeh Gregor writes: > On Mon, Aug 24, 2009 at 4:36 AM, Smylers wrote: > > > It's too complicated for most developers to roll their own > > validation, but there are standard libraries available which get it > > right. > > Standard libraries available for all major languages? I'd be surprised i

Re: [whatwg] Comments on the definition of a valid e-mail address

2009-08-24 Thread Tab Atkins Jr.
On Mon, Aug 24, 2009 at 8:54 AM, Aryeh Gregor wrote: > The breakdown of the 202 is as follows. > > * Single trailing dot in domain part: 100 (prohibited by RFC but > plausibly deliverable) Do these still have a normal TLD identifier before the trailing dot? Or are they just *really* weird? I almo

Re: [whatwg] Comments on the definition of a valid e-mail address

2009-08-24 Thread Aryeh Gregor
On Mon, Aug 24, 2009 at 4:36 AM, Smylers wrote: > It's too complicated for most developers to roll their own validation, > but there are standard libraries available which get it right. Standard libraries available for all major languages? As far as I can tell from a quick search, the PHP standar

Re: [whatwg] Comments on the definition of a valid e-mail address

2009-08-24 Thread Smylers
Aryeh Gregor writes: > Historically, MediaWiki has mostly just required that an @ symbol be > present in the address. Originally we used a simplistic regex, It's relatively well known that a simple regex can't be used to match e-mail addresses (and not match things that aren't!); Jeffrey Friedl'

Re: [whatwg] Comments on the definition of a valid e-mail address

2009-08-23 Thread Aryeh Gregor
On Sun, Aug 23, 2009 at 10:23 PM, Peter Kasting wrote: > I think telling user agents to strip leading and trailing whitespace is a > good idea.  I'm not as sure about stripping whitespace in the middle. It seems like (some?) mail agents will do that already, if it's around a dot or the @. If I do

Re: [whatwg] Comments on the definition of a valid e-mail address

2009-08-23 Thread Peter Kasting
Thanks very much for this analysis! On Sun, Aug 23, 2009 at 12:41 PM, Aryeh Gregor > wrote: > Inspection showed that the overwhelming majority of the failures were > due to the presence of excess whitespace, often a single trailing > space, or a space inserted before or after the @ sign. When I

Re: [whatwg] Comments on the definition of a valid e-mail address

2009-08-23 Thread Aryeh Gregor
On Sun, Aug 23, 2009 at 4:00 PM, Tab Atkins Jr. wrote: > Unless you avoid validating *entirely*, there's virtually always going > to be some subset of theoretically valid addresses that you'll flag as > invalid, though. There shouldn't be, IMO, if the browser is forbidden to submit them. > Unlike

Re: [whatwg] Comments on the definition of a valid e-mail address

2009-08-23 Thread Tab Atkins Jr.
Thanks for doing this work, Aryeh! It's really awesome! On Sun, Aug 23, 2009 at 2:41 PM, Aryeh Gregor wrote: > Beyond that, although it's safe to say that quoted-string or > domain-literal or even entirely invalid addresses are extraordinarily > rare, there are *some* real people who do use them.

Re: [whatwg] Comments on the definition of a valid e-mail address

2009-08-23 Thread Aryeh Gregor
On Sun, Aug 23, 2009 at 3:41 PM, Aryeh Gregor wrote: > Alternatively, you could just loosen the restrictions even further, > and only ban input that doesn't contain an @ sign.  (Or that doesn't > match ^...@]+@[...@]+\.[^@]+$, or whatever.)  Or just don't ban anything > at all, like with type=tel.

Re: [whatwg] Comments on the definition of a valid e-mail address

2009-08-23 Thread David Gerard
2009/8/23 Aryeh Gregor : >  Or just don't ban anything > at all, like with type=tel.  type=email differs from most of the other > types with validity constraints (like month, number, etc.) in that the > difference between valid and invalid values is a purely pragmatic > question (what will actual