HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
2233WF2: maxlength=''.2008-09-25 01:05
@@ -26894,20 +26894,59 @@ rel="" on submit buttons?
   attribute is a <span>boolean attribute</span>. When specified, the
   element is <i title="concept-input-immutable">immutable</i>.</p>
 
   <p><strong>Constraint validation:</strong> If the <code
   title="attr-input-readonly">readonly</code> attribute is specified
   on an <code>input</code> element, the element is <span>barred from
   constraint validation</span>.</p>
 
 
 
+  <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>
 
   <p>The <dfn title="dom-input-value"><code>value</code></dfn> DOM
   attribute allows scripts to manipulate the <span
   title="concept-fe-value">value</span> of an <code>input</code>
   element. On getting, it must return the current <span
   title="concept-fe-value">value</span> of the element. On setting,
   it must set the element's <span
@@ -27598,20 +27637,23 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
   validation</dfn>. (For example, an element is <span>barred from
   constraint validation</span> if it is an <code>output</code> or
   <code>fieldset</code> element.)</p>
 
   <p class="big-issue">An element <dfn
   title="concept-fv-valid">satisfies its constraints</dfn> if ...</p>
 
   <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
   constraints</dfn> of <code>form</code> element <var
   title="">form</var>, it must run the following steps, which return
   either a <i>positive</i> result (all the controls in the form are
   valid) or a <i>negative</i> result (there are invalid controls)
   along with a (possibly empty) list of elements that are invalid and
@@ -55022,14 +55064,15 @@ TODO (or delay):
  XXX * rephrase things so that an enumerated attribute puts the _element_ into
        various states, instead of the attribute
  XXX * make the text consistent about whether it is ":<em>" and
        ":<strong>" or "</em>:" and "</strong>:". Same for other
        punctuation.
  XXX * take references to "valid mime type" / RFC2046 and make them
        mean something. (2046 doesn't define anything like that, and
        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>
 </html>

|