Skip to content

Commit

Permalink
[acgiow] (1) Define <input type=email multiple pattern='...'> as appl…
Browse files Browse the repository at this point in the history
…ying to each e-mail address, not to the whole list.

git-svn-id: http://svn.whatwg.org/webapps@5738 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jan 4, 2011
1 parent f6d15dd commit f256378
Show file tree
Hide file tree
Showing 3 changed files with 131 additions and 34 deletions.
51 changes: 40 additions & 11 deletions complete.html
Expand Up @@ -221,7 +221,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1>Web Applications 1.0</h1>
<h2 class="no-num no-toc">Draft Standard &mdash; 2 January 2011</h2>
<h2 class="no-num no-toc">Draft Standard &mdash; 4 January 2011</h2>
</hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
Expand Down Expand Up @@ -40840,6 +40840,14 @@ <h6 id=e-mail-state><span class=secno>4.10.7.1.5 </span><dfn title=attr-input-ty
single <a href=#valid-e-mail-address>valid e-mail address</a>, the element is
<a href=#suffering-from-a-type-mismatch>suffering from a type mismatch</a>.</p>

<p>When the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>
attribute is specified on the element, then, the element's <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a> are the result of
<a href=#split-a-string-on-commas title="split a string on commas">splitting on commas</a>
the element's <a href=#concept-fe-value title=concept-fe-value>value</a>. (This is
used to define how the <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code> attribute applies when the
<code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute is
specified.)</p>

</div>

<p>A <dfn id=valid-e-mail-address-list>valid e-mail address list</dfn> is a <a href=#set-of-comma-separated-tokens>set of
Expand Down Expand Up @@ -43772,21 +43780,40 @@ <h6 id=the-pattern-attribute><span class=secno>4.10.7.2.9 </span>The <code title

<p>The <dfn id=attr-input-pattern title=attr-input-pattern><code>pattern</code></dfn>
attribute specifies a regular expression against which the control's
<a href=#concept-fe-value title=concept-fe-value>value</a> is to be checked.</p>
<a href=#concept-fe-value title=concept-fe-value>value</a>, or, when the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute applies and is
set, the control's <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a>, are to be
checked.</p>

<p>If specified, the attribute's value must match the JavaScript <i title="">Pattern</i> production. <a href=#refsECMA262>[ECMA262]</a></p>

<div class=impl>

<p>If an <code><a href=#the-input-element>input</a></code> element has a <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code> attribute specified, and
the attribute's value, when compiled as a JavaScript regular
expression with the <code title="">global</code>, <code title="">ignoreCase</code>, and <code title="">multiline</code>
flags <em>disabled</em> (see ECMA262 Edition 5, sections 15.10.7.2
through 15.10.7.4), compiles successfully, then the resulting
regular expression is the element's <dfn id=compiled-pattern-regular-expression>compiled pattern regular
expression</dfn>. If the element has no such attribute, or if the
value doesn't compile successfully, then the element has no
<a href=#compiled-pattern-regular-expression>compiled pattern regular expression</a>. <a href=#refsECMA262>[ECMA262]</a></p>

<p><strong>Constraint validation</strong>: If the element's <a href=#concept-fe-value title=concept-fe-value>value</a> is not the empty string, and
the element's <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code>
attribute is specified and the attribute's value, when compiled as a
JavaScript regular expression with the <code title="">global</code>,
<code title="">ignoreCase</code>, and <code title="">multiline</code> flags <em>disabled</em> (see ECMA262
Edition 5, sections 15.10.7.2 through 15.10.7.4), compiles
successfully but the resulting regular expression does not match the
either the element's <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute is not
specified or it does not apply to the <code><a href=#the-input-element>input</a></code> element
given its <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute's
current state, and the element has a <a href=#compiled-pattern-regular-expression>compiled pattern regular
expression</a> but that regular expression does not match the
entirety of the element's <a href=#concept-fe-value title=concept-fe-value>value</a>, then the element is
<a href=#suffering-from-a-pattern-mismatch>suffering from a pattern mismatch</a>. <a href=#refsECMA262>[ECMA262]</a></p>
<a href=#suffering-from-a-pattern-mismatch>suffering from a pattern mismatch</a>.</p>

<p><strong>Constraint validation</strong>: If the element's <a href=#concept-fe-value title=concept-fe-value>value</a> is not the empty string, and
the element's <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>
attribute is specified and applies to the <code><a href=#the-input-element>input</a></code>
element, and the element has a <a href=#compiled-pattern-regular-expression>compiled pattern regular
expression</a> but that regular expression does not match the
entirety of each of the element's <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a>, then the element
is <a href=#suffering-from-a-pattern-mismatch>suffering from a pattern mismatch</a>.</p>

<p class=note>This implies that the regular expression language
used for this attribute is the same as that used in JavaScript,
Expand Down Expand Up @@ -46936,7 +46963,6 @@ <h5 id=enabling-and-disabling-form-controls><span class=secno>4.10.19.2 </span>E
</div>



<div class=impl>

<h5 id="a-form-control's-value"><span class=secno>4.10.19.3 </span>A form control's value</h5>
Expand All @@ -46946,8 +46972,11 @@ <h5 id="a-form-control's-value"><span class=secno>4.10.19.3 </span>A form contro
is only used by <code><a href=#the-input-element>input</a></code> elements.) These are used to
describe how the user interacts with the control.</p>

</div>
<p>To define the behaviour of constraint validation in the face of
the <code><a href=#the-input-element>input</a></code> element's <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute,
<code><a href=#the-input-element>input</a></code> elements can also have separately defined <dfn id=concept-fe-values title=concept-fe-values>value<em>s</em></dfn>.</p>

</div>


<h5 id=autofocusing-a-form-control><span class=secno>4.10.19.4 </span>Autofocusing a form control</h5>
Expand Down
51 changes: 40 additions & 11 deletions index
Expand Up @@ -225,7 +225,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1>HTML5 (including next generation additions still in development)</h1>
<h2 class="no-num no-toc">Draft Standard &mdash; 2 January 2011</h2>
<h2 class="no-num no-toc">Draft Standard &mdash; 4 January 2011</h2>
</hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
Expand Down Expand Up @@ -40822,6 +40822,14 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
single <a href=#valid-e-mail-address>valid e-mail address</a>, the element is
<a href=#suffering-from-a-type-mismatch>suffering from a type mismatch</a>.</p>

<p>When the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>
attribute is specified on the element, then, the element's <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a> are the result of
<a href=#split-a-string-on-commas title="split a string on commas">splitting on commas</a>
the element's <a href=#concept-fe-value title=concept-fe-value>value</a>. (This is
used to define how the <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code> attribute applies when the
<code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute is
specified.)</p>

</div>

<p>A <dfn id=valid-e-mail-address-list>valid e-mail address list</dfn> is a <a href=#set-of-comma-separated-tokens>set of
Expand Down Expand Up @@ -43754,21 +43762,40 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H

<p>The <dfn id=attr-input-pattern title=attr-input-pattern><code>pattern</code></dfn>
attribute specifies a regular expression against which the control's
<a href=#concept-fe-value title=concept-fe-value>value</a> is to be checked.</p>
<a href=#concept-fe-value title=concept-fe-value>value</a>, or, when the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute applies and is
set, the control's <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a>, are to be
checked.</p>

<p>If specified, the attribute's value must match the JavaScript <i title="">Pattern</i> production. <a href=#refsECMA262>[ECMA262]</a></p>

<div class=impl>

<p>If an <code><a href=#the-input-element>input</a></code> element has a <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code> attribute specified, and
the attribute's value, when compiled as a JavaScript regular
expression with the <code title="">global</code>, <code title="">ignoreCase</code>, and <code title="">multiline</code>
flags <em>disabled</em> (see ECMA262 Edition 5, sections 15.10.7.2
through 15.10.7.4), compiles successfully, then the resulting
regular expression is the element's <dfn id=compiled-pattern-regular-expression>compiled pattern regular
expression</dfn>. If the element has no such attribute, or if the
value doesn't compile successfully, then the element has no
<a href=#compiled-pattern-regular-expression>compiled pattern regular expression</a>. <a href=#refsECMA262>[ECMA262]</a></p>

<p><strong>Constraint validation</strong>: If the element's <a href=#concept-fe-value title=concept-fe-value>value</a> is not the empty string, and
the element's <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code>
attribute is specified and the attribute's value, when compiled as a
JavaScript regular expression with the <code title="">global</code>,
<code title="">ignoreCase</code>, and <code title="">multiline</code> flags <em>disabled</em> (see ECMA262
Edition 5, sections 15.10.7.2 through 15.10.7.4), compiles
successfully but the resulting regular expression does not match the
either the element's <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute is not
specified or it does not apply to the <code><a href=#the-input-element>input</a></code> element
given its <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute's
current state, and the element has a <a href=#compiled-pattern-regular-expression>compiled pattern regular
expression</a> but that regular expression does not match the
entirety of the element's <a href=#concept-fe-value title=concept-fe-value>value</a>, then the element is
<a href=#suffering-from-a-pattern-mismatch>suffering from a pattern mismatch</a>. <a href=#refsECMA262>[ECMA262]</a></p>
<a href=#suffering-from-a-pattern-mismatch>suffering from a pattern mismatch</a>.</p>

<p><strong>Constraint validation</strong>: If the element's <a href=#concept-fe-value title=concept-fe-value>value</a> is not the empty string, and
the element's <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>
attribute is specified and applies to the <code><a href=#the-input-element>input</a></code>
element, and the element has a <a href=#compiled-pattern-regular-expression>compiled pattern regular
expression</a> but that regular expression does not match the
entirety of each of the element's <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a>, then the element
is <a href=#suffering-from-a-pattern-mismatch>suffering from a pattern mismatch</a>.</p>

<p class=note>This implies that the regular expression language
used for this attribute is the same as that used in JavaScript,
Expand Down Expand Up @@ -46918,7 +46945,6 @@ out of 233&thinsp;257&thinsp;824 bytes available&lt;/meter&gt;&lt;/p&gt;</pre>
</div>



<div class=impl>

<h5 id="a-form-control's-value"><span class=secno>4.10.19.3 </span>A form control's value</h5>
Expand All @@ -46928,8 +46954,11 @@ out of 233&thinsp;257&thinsp;824 bytes available&lt;/meter&gt;&lt;/p&gt;</pre>
is only used by <code><a href=#the-input-element>input</a></code> elements.) These are used to
describe how the user interacts with the control.</p>

</div>
<p>To define the behaviour of constraint validation in the face of
the <code><a href=#the-input-element>input</a></code> element's <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute,
<code><a href=#the-input-element>input</a></code> elements can also have separately defined <dfn id=concept-fe-values title=concept-fe-values>value<em>s</em></dfn>.</p>

</div>


<h5 id=autofocusing-a-form-control><span class=secno>4.10.19.4 </span>Autofocusing a form control</h5>
Expand Down
63 changes: 51 additions & 12 deletions source
Expand Up @@ -45542,6 +45542,16 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
single <span>valid e-mail address</span>, the element is
<span>suffering from a type mismatch</span>.</p>

<p>When the <code title="attr-input-multiple">multiple</code>
attribute is specified on the element, then, the element's <span
title="concept-fe-values">value<em>s</em></span> are the result of
<span title="split a string on commas">splitting on commas</span>
the element's <span title="concept-fe-value">value</span>. (This is
used to define how the <code
title="attr-input-pattern">pattern</code> attribute applies when the
<code title="attr-input-multiple">multiple</code> attribute is
specified.)</p>

</div>

<p>A <dfn>valid e-mail address list</dfn> is a <span>set of
Expand Down Expand Up @@ -48839,27 +48849,52 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {

<p>The <dfn title="attr-input-pattern"><code>pattern</code></dfn>
attribute specifies a regular expression against which the control's
<span title="concept-fe-value">value</span> is to be checked.</p>
<span title="concept-fe-value">value</span>, or, when the <code
title="attr-input-multiple">multiple</code> attribute applies and is
set, the control's <span
title="concept-fe-values">value<em>s</em></span>, are to be
checked.</p>

<p>If specified, the attribute's value must match the JavaScript <i
title="">Pattern</i> production. <a
href="#refsECMA262">[ECMA262]</a></p>

<div class="impl">

<p>If an <code>input</code> element has a <code
title="attr-input-pattern">pattern</code> attribute specified, and
the attribute's value, when compiled as a JavaScript regular
expression with the <code title="">global</code>, <code
title="">ignoreCase</code>, and <code title="">multiline</code>
flags <em>disabled</em> (see ECMA262 Edition 5, sections 15.10.7.2
through 15.10.7.4), compiles successfully, then the resulting
regular expression is the element's <dfn>compiled pattern regular
expression</dfn>. If the element has no such attribute, or if the
value doesn't compile successfully, then the element has no
<span>compiled pattern regular expression</span>. <a
href="#refsECMA262">[ECMA262]</a></p>

<p><strong>Constraint validation</strong>: If the element's <span
title="concept-fe-value">value</span> is not the empty string, and
the element's <code title="attr-input-pattern">pattern</code>
attribute is specified and the attribute's value, when compiled as a
JavaScript regular expression with the <code title="">global</code>,
<code title="">ignoreCase</code>, and <code
title="">multiline</code> flags <em>disabled</em> (see ECMA262
Edition 5, sections 15.10.7.2 through 15.10.7.4), compiles
successfully but the resulting regular expression does not match the
either the element's <code
title="attr-input-multiple">multiple</code> attribute is not
specified or it does not apply to the <code>input</code> element
given its <code title="attr-input-type">type</code> attribute's
current state, and the element has a <span>compiled pattern regular
expression</span> but that regular expression does not match the
entirety of the element's <span
title="concept-fe-value">value</span>, then the element is
<span>suffering from a pattern mismatch</span>. <a
href="#refsECMA262">[ECMA262]</a></p>
<span>suffering from a pattern mismatch</span>.</p>

<p><strong>Constraint validation</strong>: If the element's <span
title="concept-fe-value">value</span> is not the empty string, and
the element's <code title="attr-input-multiple">multiple</code>
attribute is specified and applies to the <code>input</code>
element, and the element has a <span>compiled pattern regular
expression</span> but that regular expression does not match the
entirety of each of the element's <span
title="concept-fe-values">value<em>s</em></span>, then the element
is <span>suffering from a pattern mismatch</span>.</p>

<p class="note">This implies that the regular expression language
used for this attribute is the same as that used in JavaScript,
Expand Down Expand Up @@ -52647,7 +52682,6 @@ out of 233&#x2009;257&#x2009;824 bytes available&lt;/meter>&lt;/p></pre>
</div>



<div class="impl">

<h5>A form control's value</h5>
Expand All @@ -52657,8 +52691,13 @@ out of 233&#x2009;257&#x2009;824 bytes available&lt;/meter>&lt;/p></pre>
is only used by <code>input</code> elements.) These are used to
describe how the user interacts with the control.</p>

</div>
<p>To define the behaviour of constraint validation in the face of
the <code>input</code> element's <code
title="attr-input-multiple">multiple</code> attribute,
<code>input</code> elements can also have separately defined <dfn
title="concept-fe-values">value<em>s</em></dfn>.</p>

</div>


<h5>Autofocusing a form control</h5>
Expand Down

0 comments on commit f256378

Please sign in to comment.