This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27452 - Fix definition of valid email address
Summary: Fix definition of valid email address
Status: RESOLVED DUPLICATE of bug 15489
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-27 07:48 UTC by mark
Modified: 2014-12-01 05:39 UTC (History)
2 users (show)

See Also:


Attachments

Description mark 2014-11-27 07:48:45 UTC
https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address

does not take into account EAI, or IDNA.

It should be something like:

email         = local-part "@" host
local-part    = 1*atext2 *("." 1*atext2)
host          = < as defined in https://url.spec.whatwg.org/#host-parsing >

atext2        = atext | utext
atext         = < as defined in http://tools.ietf.org/html/rfc5322#section-3.2.3 >
utext         = XID_Start 1*XID_Continue
XID_Start     = < as defined in http://www.unicode.org/reports/tr31 >
XID_Continue  = < as defined in http://www.unicode.org/reports/tr31 >


Additional conditions: 
 atext2 must be in NFC format, as defined in http://www.unicode.org/reports/tr15

Notes: 
 * for local-part, see dot-atom-text in rfc5322 section 3.2.3
 * the above doesn't provide for quoted email addresses; the syntax would have to be enhanced to allow for those.
 * the restriction to NFC is recommended in http://tools.ietf.org/html/rfc6530#section-10.1, but not required there.
 * the restriction to a Unicode identifier is not in rfc6530, but helps to prevent bizarre email addresses.
Comment 1 Ian 'Hixie' Hickson 2014-12-01 05:39:10 UTC

*** This bug has been marked as a duplicate of bug 15489 ***