hixie: Define <input type=email multiple pattern='...'> as applying to each e-mail address, not to the whole list. (whatwg r5738)

hixie: Define <input type=email multiple pattern='...'> as applying to
each e-mail address, not to the whole list. (whatwg r5738)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.4600&r2=1.4601&f=h
http://html5.org/tools/web-apps-tracker?from=5737&to=5738

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.4600
retrieving revision 1.4601
diff -u -d -r1.4600 -r1.4601
--- Overview.html 2 Jan 2011 04:01:39 -0000 1.4600
+++ Overview.html 4 Jan 2011 23:28:07 -0000 1.4601
@@ -31716,6 +31716,14 @@
   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
   comma-separated tokens</a>, where each token is itself a
   <a href="#valid-e-mail-address">valid e-mail address</a>. <span class="impl">To obtain the
@@ -34211,17 +34219,36 @@
 
   </div><h6 id="the-pattern-attribute"><span class="secno">4.10.7.2.9 </span>The <code title="attr-input-pattern"><a href="#attr-input-pattern">pattern</a></code> attribute</h6><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>If specified, the attribute's value must match the JavaScript <i title="">Pattern</i> production. <a href="#refsECMA262">[ECMA262]</a><div class="impl">
+  <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>If specified, the attribute's value must match the JavaScript <i title="">Pattern</i> production. <a href="#refsECMA262">[ECMA262]</a><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,
@@ -36984,6 +37011,10 @@
   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>
 
+  <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><!-- v2: Apply this to contentEditable elements --><p>The <dfn id="attr-fe-autofocus" title="attr-fe-autofocus"><code>autofocus</code></dfn>
   content attribute allows the author to indicate that a control is to
   be focused as soon as the page is loaded, allowing the user to just

Received on Wednesday, 12 January 2011 02:44:14 UTC