HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/2278

File a bug

SVNBugCommentTime (UTC)
2278WF2: <input pattern>2008-10-04 00:22
Index: source
===================================================================
--- source	(revision 2277)
+++ source	(revision 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>
 

|