Permalink
Browse files

[] (0) WF2: maxlength=''.

git-svn-id: http://svn.whatwg.org/webapps@2233 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
1 parent c016701 commit 52fbd4c7fc7d8548c0cb98f1346e6179962953de @Hixie Hixie committed Sep 25, 2008
Showing with 113 additions and 20 deletions.
  1. +70 −20 index
  2. +43 −0 source
View
90 index
@@ -29,7 +29,7 @@
<h1 id=html-5>HTML 5</h1>
- <h2 class="no-num no-toc" id=draft>Draft Recommendation &mdash; 24
+ <h2 class="no-num no-toc" id=draft>Draft Recommendation &mdash; 25
September 2008</h2>
<p>You can take part in this work. <a
@@ -1136,6 +1136,10 @@
<li><a href="#the-readonly"><span class=secno>4.10.4.2.2.
</span>The <code title=attr-input-readonly>readonly</code>
attribute</a>
+
+ <li><a href="#the-maxlength"><span class=secno>4.10.4.2.3.
+ </span>The <code title=attr-input-maxlength>maxlength</code>
+ attribute</a>
</ul>
<li><a href="#common5"><span class=secno>4.10.4.3. </span>Common
@@ -28067,7 +28071,8 @@ function AddCloud(data, x, y) { ... }</pre>
<dd><code title=attr-input-max>max</code>
- <dd><code title=attr-input-maxlength>maxlength</code>
+ <dd><code title=attr-input-maxlength><a
+ href="#maxlength0">maxlength</a></code>
<dd><code title=attr-fs-method><a href="#method">method</a></code>
@@ -28389,10 +28394,10 @@ function AddCloud(data, x, y) { ... }</pre>
title=attr-input-checked>checked</code>, <code title=attr-fs-enctype><a
href="#enctype">enctype</a></code>, and <code
title=attr-input-list>list</code>, <code title=attr-input-max>max</code>,
- <code title=attr-input-maxlength>maxlength</code>, <code
- title=attr-fs-method><a href="#method">method</a></code>, <code
- title=attr-input-min>min</code>, <code
- title=attr-input-pattern>pattern</code>, <code
+ <code title=attr-input-maxlength><a
+ href="#maxlength0">maxlength</a></code>, <code title=attr-fs-method><a
+ href="#method">method</a></code>, <code title=attr-input-min>min</code>,
+ <code title=attr-input-pattern>pattern</code>, <code
title=attr-input-readonly><a href="#readonly0">readonly</a></code>, <code
title=attr-input-required>required</code>, <code
title=attr-input-size>size</code>, <code title=attr-input-src>src</code>,
@@ -28809,7 +28814,8 @@ function AddCloud(data, x, y) { ... }</pre>
<td class=no> &middot; <!-- Button -->
<tr>
- <th> <code title=attr-input-maxlength>maxlength</code>
+ <th> <code title=attr-input-maxlength><a
+ href="#maxlength0">maxlength</a></code>
<td class=yes> Yes <!-- Text -->
@@ -29646,8 +29652,8 @@ function AddCloud(data, x, y) { ... }</pre>
<p>The <dfn id=maxlength
title=dom-input-maxLength><code>maxLength</code></dfn> DOM attribute must
- <a href="#reflect">reflect</a> the <code
- title=attr-input-maxlength>maxlength</code> content attribute. The <dfn
+ <a href="#reflect">reflect</a> the <code title=attr-input-maxlength><a
+ href="#maxlength0">maxlength</a></code> content attribute. The <dfn
id=readonly title=dom-input-readOnly><code>readOnly</code></dfn> DOM
attribute must <a href="#reflect">reflect</a> the <code
title=attr-input-readonly><a href="#readonly0">readonly</a></code> content
@@ -29710,8 +29716,8 @@ function AddCloud(data, x, y) { ... }</pre>
attributes, DOM attributes, and methods apply to the element: <code
title=attr-input-autocomplete><a
href="#autocomplete0">autocomplete</a></code>, <code
- title=attr-input-list>list</code>, <code
- title=attr-input-maxlength>maxlength</code>, <code
+ title=attr-input-list>list</code>, <code title=attr-input-maxlength><a
+ href="#maxlength0">maxlength</a></code>, <code
title=attr-input-pattern>pattern</code>, <code
title=attr-input-readonly><a href="#readonly0">readonly</a></code>, <code
title=attr-input-required>required</code>, and <code
@@ -29790,8 +29796,8 @@ function AddCloud(data, x, y) { ... }</pre>
element content attributes apply to the element: <code
title=attr-input-autocomplete><a
href="#autocomplete0">autocomplete</a></code>, <code
- title=attr-input-maxlength>maxlength</code>, <code
- title=attr-input-pattern>pattern</code>, <code
+ title=attr-input-maxlength><a href="#maxlength0">maxlength</a></code>,
+ <code title=attr-input-pattern>pattern</code>, <code
title=attr-input-readonly><a href="#readonly0">readonly</a></code>, <code
title=attr-input-required>required</code>, and <code
title=attr-input-size>size</code>.
@@ -29880,8 +29886,8 @@ function AddCloud(data, x, y) { ... }</pre>
attributes, DOM attributes, and methods apply to the element: <code
title=attr-input-autocomplete><a
href="#autocomplete0">autocomplete</a></code>, <code
- title=attr-input-list>list</code>, <code
- title=attr-input-maxlength>maxlength</code>, <code
+ title=attr-input-list>list</code>, <code title=attr-input-maxlength><a
+ href="#maxlength0">maxlength</a></code>, <code
title=attr-input-pattern>pattern</code>, <code
title=attr-input-readonly><a href="#readonly0">readonly</a></code>, <code
title=attr-input-required>required</code>, and <code
@@ -29966,8 +29972,8 @@ function AddCloud(data, x, y) { ... }</pre>
attributes, DOM attributes, and methods apply to the element: <code
title=attr-input-autocomplete><a
href="#autocomplete0">autocomplete</a></code>, <code
- title=attr-input-list>list</code>, <code
- title=attr-input-maxlength>maxlength</code>, <code
+ title=attr-input-list>list</code>, <code title=attr-input-maxlength><a
+ href="#maxlength0">maxlength</a></code>, <code
title=attr-input-pattern>pattern</code>, <code
title=attr-input-readonly><a href="#readonly0">readonly</a></code>, <code
title=attr-input-required>required</code>, and <code
@@ -30091,9 +30097,9 @@ function AddCloud(data, x, y) { ... }</pre>
href="#accept0">accept</a></code>, <code class=no-backref
title=attr-input-alt>alt</code>, <code class=no-backref
title=attr-input-checked>checked</code>, <code class=no-backref
- title=attr-input-maxlength>maxlength</code>, <code class=no-backref
- title=attr-input-pattern>pattern</code>, <code class=no-backref
- title=attr-input-size>size</code>, <code class=no-backref
+ title=attr-input-maxlength><a href="#maxlength0">maxlength</a></code>,
+ <code class=no-backref title=attr-input-pattern>pattern</code>, <code
+ class=no-backref title=attr-input-size>size</code>, <code class=no-backref
title=attr-input-src>src</code>, <code class=no-backref
title=attr-fs-target><a href="#target3">target</a></code>, <code
class=no-backref title=attr-fs-method><a href="#method">method</a></code>,
@@ -30436,6 +30442,46 @@ rel="" on submit buttons?
element, the element is <a href="#barred">barred from constraint
validation</a>.
+ <h6 id=the-maxlength><span class=secno>4.10.4.2.3. </span>The <code
+ title=attr-input-maxlength><a href="#maxlength0">maxlength</a></code>
+ attribute</h6>
+
+ <p>The <dfn id=maxlength0
+ title=attr-input-maxlength><code>maxlength</code></dfn> attribute allows
+ authors to specify the maximum length allowed for user input.
+
+ <p>The <dfn id=codepoint>codepoint length</dfn> of a string is the number
+ of Unicode codepoints in that string.
+
+ <p>If the attribute is specified, the attribute's value must be a <a
+ href="#valid">valid non-negative integer</a>. If the attribute is
+ specified and applying the <a href="#rules">rules for parsing non-negative
+ integers</a> to its value results in a number, then that number is the
+ element's <dfn id=maximum>maximum allowed value length</dfn>. If the
+ attribute is omitted or parsing its value results in an error, then there
+ is no <a href="#maximum">maximum allowed value length</a>.
+
+ <p>If the <code><a href="#input0">input</a></code> element has a <a
+ href="#maximum">maximum allowed value length</a>, then the <a
+ href="#codepoint">codepoint length</a> of the value of the element's <code
+ title=attr-input-value><a href="#value9">value</a></code> attribute must
+ be equal to or less than the element's <a href="#maximum">maximum allowed
+ value length</a>.
+
+ <p><strong>Constraint validation:</strong> If an <code><a
+ href="#input0">input</a></code> element has a <a href="#maximum">maximum
+ allowed value length</a>, and it is not <a href="#dirty0"
+ title=concept-input-dirty>dirty</a>, and the <a
+ href="#codepoint">codepoint length</a> of the element's <span
+ title=concept-input-value>value</span> is greater than the element's <a
+ href="#maximum">maximum allowed value length</a>, then the element is <a
+ href="#suffering0">suffering from being too long</a>.
+
+ <p>User agents may prevent the user from setting the element's <span
+ title=concept-input-value>value</span> to a value whose <a
+ href="#codepoint">codepoint length</a> is greater than the element's <a
+ href="#maximum">maximum allowed value length</a>.
+
<h5 id=common5><span class=secno>4.10.4.3. </span>Common <code><a
href="#input0">input</a></code> element APIs</h5>
@@ -31294,6 +31340,9 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href="#htmlelem
<p class=big-issue>... <dfn id=suffering>suffering from a type
mismatch</dfn>
+ <p class=big-issue>... <dfn id=suffering0>suffering from being too
+ long</dfn>
+
<h5 id=constraint><span class=secno>4.10.15.2. </span>Constraint validation</h5>
<p>When the user agent is required to <dfn id=statically>statically
@@ -61271,4 +61320,5 @@ TODO (or delay):
2045's definition doesn't really help either, since it's part
of something else, and doesn't mention whitespace, etc.)
XXX * reference [UTC] in the various places that use it.
+ XXX * make codepoint vs code point consistent
-->
View
43 source
@@ -26901,6 +26901,45 @@ rel="" on submit buttons?
+ <h6>The <code title="attr-input-maxlength">maxlength</code> attribute</h6>
+
+ <p>The <dfn
+ title="attr-input-maxlength"><code>maxlength</code></dfn> attribute
+ allows authors to specify the maximum length allowed for user
+ input.</p>
+
+ <p>The <dfn>codepoint length</dfn> of a string is the number of
+ Unicode codepoints in that string.</p>
+
+ <p>If the attribute is specified, the attribute's value must be a
+ <span>valid non-negative integer</span>. If the attribute is
+ specified and applying the <span>rules for parsing non-negative
+ integers</span> to its value results in a number, then that number
+ is the element's <dfn>maximum allowed value length</dfn>. If the
+ attribute is omitted or parsing its value results in an error, then
+ there is no <span>maximum allowed value length</span>.</p>
+
+ <p>If the <code>input</code> element has a <span>maximum allowed
+ value length</span>, then the <span>codepoint length</span> of the
+ value of the element's <code title="attr-input-value">value</code>
+ attribute must be equal to or less than the element's <span>maximum
+ allowed value length</span>.</p>
+
+ <p><strong>Constraint validation:</strong> If an <code>input</code>
+ element has a <span>maximum allowed value length</span>, and it is
+ not <span title="concept-input-dirty">dirty</span>, and the
+ <span>codepoint length</span> of the element's <span
+ title="concept-input-value">value</span> is greater than the
+ element's <span>maximum allowed value length</span>, then the
+ element is <span>suffering from being too long</span>.</p>
+
+ <p>User agents may prevent the user from setting the element's <span
+ title="concept-input-value">value</span> to a value whose
+ <span>codepoint length</span> is greater than the element's
+ <span>maximum allowed value length</span>.</p>
+
+
+
<h5>Common <code>input</code> element APIs</h5>
<h6>Value manipulation</h6>
@@ -27605,6 +27644,9 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
<p class="big-issue">... <dfn>suffering from a type
mismatch</dfn></p>
+ <p class="big-issue">... <dfn>suffering from being too
+ long</dfn></p>
+
<h5>Constraint validation</h5>
@@ -55029,6 +55071,7 @@ TODO (or delay):
2045's definition doesn't really help either, since it's part
of something else, and doesn't mention whitespace, etc.)
XXX * reference [UTC] in the various places that use it.
+ XXX * make codepoint vs code point consistent
-->
</body>

0 comments on commit 52fbd4c

Please sign in to comment.