[html5] r2233 - [] (0) WF2: maxlength=''.

whatwg at whatwg.org whatwg at whatwg.org
Wed Sep 24 18:05:03 PDT 2008


Author: ianh
Date: 2008-09-24 18:05:03 -0700 (Wed, 24 Sep 2008)
New Revision: 2233

Modified:
   index
   source
Log:
[] (0) WF2: maxlength=''.

Modified: index
===================================================================
--- index	2008-09-24 11:37:26 UTC (rev 2232)
+++ index	2008-09-25 01:05:03 UTC (rev 2233)
@@ -29,7 +29,7 @@
 
    <h1 id=html-5>HTML 5</h1>
 
-   <h2 class="no-num no-toc" id=draft>Draft Recommendation — 24
+   <h2 class="no-num no-toc" id=draft>Draft Recommendation — 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 @@
 
    <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 @@
    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 @@
      <td class=no> · <!-- 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 @@
 
   <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 @@
    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 @@
    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 @@
    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 @@
    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 @@
    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 @@
    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 @@
   <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 @@
        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
 -->

Modified: source
===================================================================
--- source	2008-09-24 11:37:26 UTC (rev 2232)
+++ source	2008-09-25 01:05:03 UTC (rev 2233)
@@ -26901,6 +26901,45 @@
 
 
 
+  <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,8 +27644,11 @@
   <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>
 
   <p>When the user agent is required to <dfn>statically validate the
@@ -55029,6 +55071,7 @@
        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>




More information about the Commit-Watchers mailing list