HTML Standard Tracker

Diff (omit for latest revision)
Filter

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

File a bug

SVNBugCommentTime (UTC)
2233WF2: maxlength=''.2008-09-25 01:05
Index: source
===================================================================
--- source	(revision 2232)
+++ source	(revision 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>

|