[whatwg] Make "foo at bar.com, " a valid email address list
Aryeh Gregor
Simetrical+w3c at gmail.com
Fri Oct 22 11:31:53 PDT 2010
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.
More information about the whatwg
mailing list