Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The "valid e-mail address" definition doesn't accept IPv6 emails #4089

Open
mgol opened this issue Oct 12, 2018 · 5 comments

Comments

4 participants
@mgol
Copy link

commented Oct 12, 2018

The "valid e-mail address" definition in the spec:
https://html.spec.whatwg.org/#valid-e-mail-address
doesn't accept emails with an IPv6 host like xyz@[IPv6:2001::1]. E-mails like that are defined in "RFC 5321 (SMTP)" in section 4.1.3:
https://tools.ietf.org/html/rfc5321#section-4.1.3
We've got an issue in AngularJS about not supporting such e-mails:
angular/angular.js#16599
and I noticed the HTML standard doesn't do that either. Is it a conscious decision? If yes, what are the reasons?

I searched the issues & PRs but the word "IPv6" doesn't return any relevant results.

@annevk

This comment has been minimized.

Copy link
Member

commented Oct 12, 2018

I somewhat doubt it was. Not supporting internationalized emails is: https://www.w3.org/Bugs/Public/show_bug.cgi?id=15489.

cc @tkent-google

@tkent-google

This comment has been minimized.

Copy link
Collaborator

commented Oct 15, 2018

I'm negative of supporting the IP address form of email addresses in the HTML platform.

  • I guess many web applications don't support this form of email addresses.
  • It's easy to make such element by <input type=text pattern=...>
@mgol

This comment has been minimized.

Copy link
Author

commented Oct 15, 2018

I realize it's easy to use <input type=text pattern=...> but shouldn't the spec allow all valid emails to reduce surprises?

Just to note, the W3C spec allows such emails: w3c/html#1638 (comment)

@annevk

This comment has been minimized.

Copy link
Member

commented Oct 15, 2018

Well, it was just argued that it could cause surprise.

We still need some kind of way to support internationalized email addresses at least, perhaps we should support IP addresses in that variant too. If it's opt-in than applications can decide for themselves whether they want to support it.

(It's not clear to me why the W3C decided to change this without implementer support.)

@gibson042

This comment has been minimized.

Copy link
Contributor

commented Oct 20, 2018

It's easy to make such element by <input type=text pattern=...>

I believe it is technically possible to properly validate email addresses via regular expression, but I challenge anyone describing such a task as "easy" to attempt it. I'll happily provide counterexamples in response to any proposed pattern.

@annevk annevk referenced this issue Oct 29, 2018

Open

HTML General Review: HTML Forms #253

1 of 3 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.