W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2010

[whatwg] Make "foo@bar.com, " a valid email address list

From: Aryeh Gregor <Simetrical+w3c@gmail.com>
Date: Fri, 22 Oct 2010 14:31:53 -0400
Message-ID: <AANLkTi=5eq8NL7C1_bKK5QvcwHupzB3ZKNz0ph+rwkL+@mail.gmail.com>
On Thu, Oct 21, 2010 at 9:31 AM, Mounir Lamouri
<mounir.lamouri at gmail.com> wrote:
> Hi,
> For the moment, a valid email address list is a set of comma-separated
> tokens where each tokens are a valid email address so in the case of
> "foo at bar.com, ", "foo at bar.com" is a valid email address but not "".
> Unfortunately, as soon as you want to put a UI on top of that, values
> will always be appended by ", ". Indeed, a comma have to be added to
> mark that the user is now editing another email address so the UI can
> suggests new ones. Without adding the comma automatically, the user
> would have to add it by hand to have the UI suggesting new entries.
> So, if we do not fix the specifications, all <input type='email'
> multiple> with a UI will be whether invalid or really annoying to implement.
> You can found an example of that kind of UI in GMail.

Gmail also allows addresses like "Aryeh Gregor
<Simetrical+w3c at gmail.com>", which are not valid e-mail addresses per
spec.  Good UI here would be to accept an address like that but strip
the part outside of the <> for the purpose of submission and script
access.  Likewise, you can just strip the trailing comma for
submission and script access.  The entire current spec seems to be
built around the idea that browsers should accept relatively free-form
input but make sure it's only visible to the server or scripts in a
tidied-up form, so that author-written scripts (whether server-side or
client-side) can assume a simple format that's easy to work with.
Received on Friday, 22 October 2010 11:31:53 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:27 UTC