[html5] r2278 - [] (0) WF2: <input pattern>

whatwg at whatwg.org whatwg at whatwg.org
Fri Oct 3 17:22:33 PDT 2008


Author: ianh
Date: 2008-10-03 17:22:32 -0700 (Fri, 03 Oct 2008)
New Revision: 2278

Modified:
   index
   source
Log:
[] (0) WF2: <input pattern>

Modified: index
===================================================================
--- index	2008-10-03 23:42:57 UTC (rev 2277)
+++ index	2008-10-04 00:22:32 UTC (rev 2278)
@@ -16,7 +16,7 @@
   <div class=head>
    <p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <h1>HTML 5</h1>
-   <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 3 October 2008</h2>
+   <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 4 October 2008</h2>
    <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>
    <dl><dt>Multiple-page version:</dt>
@@ -25699,10 +25699,26 @@
 
   <h6 id=the-pattern-attribute><span class=secno>4.10.4.2.7 </span>The <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code> attribute</h6>
 
-  <p class=XXX>... <dfn id=attr-input-pattern title=attr-input-pattern><code>pattern</code></dfn></p>
+  <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>
 
+  <p>If specified, the attribute's value must match the <i title="">Pattern</i> production of ECMA 262's grammar. <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
+  an ECMA 262 regular expression with the <code title="">global</code>, <code title="">ignoreCase</code>, and <code title="">multiline</code> flags <em>disabled</em> (see ECMA 262,
+  sections 15.10.7.2 through 15.10.7.4), compiles successfully but the
+  resulting 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 <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 defined in <a href=#refsECMA262>[ECMA262]</a>, except that the <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code> attribute must match the
+  entire value, not just any subset (somewhat as if it implied a <code title="">^(?:</code> at the start of the pattern and a <code title="">)$</code> at the end).</p>
+
+
   <h6 id=the-min-and-max-attributes><span class=secno>4.10.4.2.8 </span>The <code title=attr-input-min><a href=#attr-input-min>min</a></code> and <code title=attr-input-max><a href=#attr-input-max>max</a></code> attributes</h6>
 
   <p>The <dfn id=attr-input-min title=attr-input-min><code>min</code></dfn> and <dfn id=attr-input-max title=attr-input-max><code>max</code></dfn> attributes indicate

Modified: source
===================================================================
--- source	2008-10-03 23:42:57 UTC (rev 2277)
+++ source	2008-10-04 00:22:32 UTC (rev 2278)
@@ -28622,10 +28622,35 @@
 
   <h6>The <code title="attr-input-pattern">pattern</code> attribute</h6>
 
-  <p class="XXX">... <dfn title="attr-input-pattern"><code>pattern</code></dfn></p>
+  <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>
 
+  <p>If specified, the attribute's value must match the <i
+  title="">Pattern</i> production of ECMA 262's grammar. <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
+  an ECMA 262 regular expression with the <code
+  title="">global</code>, <code title="">ignoreCase</code>, and <code
+  title="">multiline</code> flags <em>disabled</em> (see ECMA 262,
+  sections 15.10.7.2 through 15.10.7.4), compiles successfully but the
+  resulting 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>.</p>
 
+  <p class="note">This implies that the regular expression language
+  used for this attribute is the same as that defined in <a
+  href="#refsECMA262">[ECMA262]</a>, except that the <code
+  title="attr-input-pattern">pattern</code> attribute must match the
+  entire value, not just any subset (somewhat as if it implied a <code
+  title="">^(?:</code> at the start of the pattern and a <code
+  title="">)$</code> at the end).</p>
+
+
   <h6>The <code title="attr-input-min">min</code> and <code
   title="attr-input-max">max</code> attributes</h6>
 




More information about the Commit-Watchers mailing list