Skip to content

Commit

Permalink
[] (0) WF2: <input pattern>
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@2278 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 4, 2008
1 parent ffe3636 commit 9c87f47
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
20 changes: 18 additions & 2 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -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-&mdash;-date:-01-jan-1901>Draft Recommendation &mdash; 3 October 2008</h2>
<h2 class="no-num no-toc" id=draft-recommendation-&mdash;-date:-01-jan-1901>Draft Recommendation &mdash; 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>
Expand Down Expand Up @@ -25699,8 +25699,24 @@ function AddCloud(data, x, y) { ... }</pre>

<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>
Expand Down
27 changes: 26 additions & 1 deletion source
Original file line number Diff line number Diff line change
Expand Up @@ -28622,8 +28622,33 @@ function AddCloud(data, x, y) { ... }</pre>

<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
Expand Down

0 comments on commit 9c87f47

Please sign in to comment.