Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 24 additions & 8 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -48795,17 +48795,30 @@ interface <dfn interface>HTMLInputElement</dfn> : <span>HTMLElement</span> {

<p>A <dfn id="valid-e-mail-address">valid email address</dfn> is a string that matches the <code
data-x="">email</code> production of the following ABNF, the character set for which is Unicode.
This ABNF implements the extensions described in RFC 1123. <ref>ABNF</ref> <ref>RFC5322</ref>
<ref>RFC1034</ref> <ref>RFC1123</ref></p>

<pre><code data-x="" class="abnf">email = 1*( atext / "." ) "@" label *( "." label )
label = let-dig [ [ ldh-str ] let-dig ] ; limited to a length of 63 characters by <a href="https://www.rfc-editor.org/rfc/rfc1034#section-3.5">RFC 1034 section 3.5</a>
atext = &lt; as defined in <a href="https://www.rfc-editor.org/rfc/rfc5322#section-3.2.3">RFC 5322 section 3.2.3</a> >
let-dig = &lt; as defined in <a href="https://www.rfc-editor.org/rfc/rfc1034#section-3.5">RFC 1034 section 3.5</a> >
ldh-str = &lt; as defined in <a href="https://www.rfc-editor.org/rfc/rfc1034#section-3.5">RFC 1034 section 3.5</a> ></code></pre>
This ABNF implements the extensions described in RFC 1123 and includes support for internationalized
email addresses as described in RFC 6531. <ref>ABNF</ref> <ref>RFC5322</ref>
<ref>RFC1034</ref> <ref>RFC1123</ref> <ref>RFC6531</ref></p>

<pre><code data-x="" class="abnf">email = localpart "@" domain
localpart = 1*( utext / "." )
utext = ALPHA / DIGIT / "!" / ; unreserved printable ASCII
"#" / "$" / "%" / "&" / "'" / "*" / ; as defined in RFC5322 section 3.2.3
"+" / "-" / "/" / "=" / "?" / "^" /
"_" / "`" / "{" / "|" / "}" / "~" /
%80-D7FF / %E000-10FFFF ; or any other non-ASCII Unicode
domain = &lt; a "valid domain string", see URL section 3.4 &gt;</code></pre>

<!-- Domain syntax based on section 3.5 of [RFC1034] and section 2.1 of [RFC1123] -->

<p class="note">This definition supports internationalized email addresses ("SMTPUTF8"), including
non-ASCII values in both the localpart (the mailbox name or "left hand side") and the domain
portions of the address. The domain is required to be a
<a href="https://url.spec.whatwg.org/#valid-domain-string">valid domain string</a>. Because of the details
for encoding non-ASCII domain names, it is not possible to describe the domain portation of an
address in a simple regular expression. The number and range of Unicode characters permited are
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should you delete the regular expression below, then? I think so, but this feature is pretty confusing.

interdependent and somwhat variable. The URL spec, <a href="https://url.spec.whatwg.org#host-parsing">
Section 3.5</a> describes how the domain is validated. <ref>URL</ref></p>

<p class="note">This requirement is a <span>willful violation</span> of RFC 5322, which defines a
syntax for email addresses that is simultaneously too strict (before the "@" character), too
vague (after the "@" character), and too lax (allowing comments, whitespace characters, and quoted
Expand Down Expand Up @@ -143425,6 +143438,9 @@ INSERT INTERFACES HERE
<dt id="refsRFC1123">[RFC1123]</dt>
<dd><cite><a href="https://www.rfc-editor.org/rfc/rfc1123">Requirements for Internet Hosts -- Application and Support</a></cite>, R. Braden. IETF, October 1989.</dd>

<dt id="refsRFC6531">[RFC6531]</dt>
<dd><cite><a href="https://www.rfc-editor.org/rfc/rfc6531">SMTP Extension for Internationalized Email</a></cite>, J. Yao, W.Mao. IETF, February 2012.</dd>

<dt id="refsRFC2046">[RFC2046]</dt>
<dd><cite><a href="https://www.rfc-editor.org/rfc/rfc2046">Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types</a></cite>, N. Freed, N. Borenstein. IETF.</dd> <!-- for text/plain and "Internet Media type"; not for definition of "MIME type". -->

Expand Down