[html5] r2320 - [] (0) WF2: Define the ailments for a form control.

whatwg at whatwg.org whatwg at whatwg.org
Thu Oct 9 19:54:53 PDT 2008


Author: ianh
Date: 2008-10-09 19:54:53 -0700 (Thu, 09 Oct 2008)
New Revision: 2320

Modified:
   index
   source
Log:
[] (0) WF2: Define the ailments for a form control.

Modified: index
===================================================================
--- index	2008-10-10 02:27:14 UTC (rev 2319)
+++ index	2008-10-10 02:54:53 UTC (rev 2320)
@@ -549,20 +549,20 @@
        <li><a href=#enabling-and-disabling-form-controls><span class=secno>4.10.13.2 </span>Enabling and disabling form controls</a></li>
        <li><a href="#a-form-control's-value"><span class=secno>4.10.13.3 </span>A form control's value</a></li>
        <li><a href=#autofocusing-a-form-control><span class=secno>4.10.13.4 </span>Autofocusing a form control</a></li>
-       <li><a href=#limiting-user-input-length><span class=secno>4.10.13.5 </span>Limiting user input length</a></ol></li>
-     <li><a href=#attributes-for-form-submission><span class=secno>4.10.14 </span>Attributes for form submission</a></li>
-     <li><a href=#constraints><span class=secno>4.10.15 </span>Constraints</a>
+       <li><a href=#limiting-user-input-length><span class=secno>4.10.13.5 </span>Limiting user input length</a></li>
+       <li><a href=#form-submission><span class=secno>4.10.13.6 </span>Form submission</a></ol></li>
+     <li><a href=#constraints><span class=secno>4.10.14 </span>Constraints</a>
       <ol>
-       <li><a href=#definitions><span class=secno>4.10.15.1 </span>Definitions</a></li>
-       <li><a href=#constraint-validation><span class=secno>4.10.15.2 </span>Constraint validation</a></li>
-       <li><a href=#the-constraint-validation-api><span class=secno>4.10.15.3 </span>The constraint validation API</a></ol></li>
-     <li><a href=#form-submission><span class=secno>4.10.16 </span>Form submission</a>
+       <li><a href=#definitions><span class=secno>4.10.14.1 </span>Definitions</a></li>
+       <li><a href=#constraint-validation><span class=secno>4.10.14.2 </span>Constraint validation</a></li>
+       <li><a href=#the-constraint-validation-api><span class=secno>4.10.14.3 </span>The constraint validation API</a></ol></li>
+     <li><a href=#form-submission-0><span class=secno>4.10.15 </span>Form submission</a>
       <ol>
-       <li><a href=#url-encoded-form-data><span class=secno>4.10.16.1 </span>URL-encoded form data</a></li>
-       <li><a href=#multipart-form-data><span class=secno>4.10.16.2 </span>Multipart form data</a></li>
-       <li><a href=#plain-text-form-data><span class=secno>4.10.16.3 </span>Plain text form data</a></ol></li>
-     <li><a href=#resetting-a-form><span class=secno>4.10.17 </span>Resetting a form</a></li>
-     <li><a href=#event-dispatch><span class=secno>4.10.18 </span>Event dispatch</a></ol></li>
+       <li><a href=#url-encoded-form-data><span class=secno>4.10.15.1 </span>URL-encoded form data</a></li>
+       <li><a href=#multipart-form-data><span class=secno>4.10.15.2 </span>Multipart form data</a></li>
+       <li><a href=#plain-text-form-data><span class=secno>4.10.15.3 </span>Plain text form data</a></ol></li>
+     <li><a href=#resetting-a-form><span class=secno>4.10.16 </span>Resetting a form</a></li>
+     <li><a href=#event-dispatch><span class=secno>4.10.17 </span>Event dispatch</a></ol></li>
    <li><a href=#interactive-elements><span class=secno>4.11 </span>Interactive elements</a>
     <ol>
      <li><a href=#the-details-element><span class=secno>4.11.1 </span>The <code>details</code> element</a></li>
@@ -22713,7 +22713,7 @@
   empty string, and the value must be unique amongst the
   <code><a href=#the-form-element>form</a></code> elements in the <code title=dom-forms>forms</code> collection that it is in, if any.</p>
 
-  <p>The <code title=attr-fs-action><a href=#attr-fs-action>action</a></code>, <code title=attr-fs-enctype><a href=#attr-fs-enctype>enctype</a></code>, <code title=attr-fs-method><a href=#attr-fs-method>method</a></code>, and <code title=attr-fs-target><a href=#attr-fs-target>target</a></code> attributes are <a href=#attributes-for-form-submission>attributes
+  <p>The <code title=attr-fs-action><a href=#attr-fs-action>action</a></code>, <code title=attr-fs-enctype><a href=#attr-fs-enctype>enctype</a></code>, <code title=attr-fs-method><a href=#attr-fs-method>method</a></code>, and <code title=attr-fs-target><a href=#attr-fs-target>target</a></code> attributes are <a href=#form-submission>attributes
   for form submission</a>.</p>
 
   <p>The <dfn id=dom-form-accept-charset title=dom-form-accept-charset><code>accept-charset</code></dfn>
@@ -25402,8 +25402,8 @@
   owner</a> from the <code><a href=#the-input-element>input</a></code> element; otherwise, it is
   to do nothing.</p>
 
-  <p>The <code title=attr-fs-action><a href=#attr-fs-action>action</a></code>, <code title=attr-fs-enctype><a href=#attr-fs-enctype>enctype</a></code>, <code title=attr-fs-method><a href=#attr-fs-method>method</a></code>, and <code title=attr-fs-target><a href=#attr-fs-target>target</a></code> attributes control the form
-  submission.</p>
+  <p>The <code title=attr-fs-action><a href=#attr-fs-action>action</a></code>, <code title=attr-fs-enctype><a href=#attr-fs-enctype>enctype</a></code>, <code title=attr-fs-method><a href=#attr-fs-method>method</a></code>, and <code title=attr-fs-target><a href=#attr-fs-target>target</a></code> attributes are <a href=#form-submission>attributes
+  for form submission</a>.</p>
 
   <div class=bookkeeping>
 
@@ -25553,8 +25553,8 @@
   equal to zero, and less than or equal to the rendered height, in CSS
   pixels, of the image.</p>
 
-  <hr><p>The <code title=attr-fs-action><a href=#attr-fs-action>action</a></code>, <code title=attr-fs-enctype><a href=#attr-fs-enctype>enctype</a></code>, <code title=attr-fs-method><a href=#attr-fs-method>method</a></code>, and <code title=attr-fs-target><a href=#attr-fs-target>target</a></code> attributes control the form
-  submission.</p>
+  <hr><p>The <code title=attr-fs-action><a href=#attr-fs-action>action</a></code>, <code title=attr-fs-enctype><a href=#attr-fs-enctype>enctype</a></code>, <code title=attr-fs-method><a href=#attr-fs-method>method</a></code>, and <code title=attr-fs-target><a href=#attr-fs-target>target</a></code> attributes are <a href=#form-submission>attributes
+  for form submission</a>.</p>
 
   <div class=bookkeeping>
 
@@ -26336,8 +26336,8 @@
   attribute represents the element's name. The <code title=attr-fe-disabled><a href=#attr-fe-disabled>disabled</a></code> attribute is used to make
   the control non-interactive and to prevent its value from being
   submitted. The <code title=attr-fe-autofocus><a href=#attr-fe-autofocus>autofocus</a></code>
-  attribute controls focus. The <code title=attr-fs-action><a href=#attr-fs-action>action</a></code>, <code title=attr-fs-enctype><a href=#attr-fs-enctype>enctype</a></code>, <code title=attr-fs-method><a href=#attr-fs-method>method</a></code>, and <code title=attr-fs-target><a href=#attr-fs-target>target</a></code> attributes control the form
-  submission.</p>
+  attribute controls focus. The <code title=attr-fs-action><a href=#attr-fs-action>action</a></code>, <code title=attr-fs-enctype><a href=#attr-fs-enctype>enctype</a></code>, <code title=attr-fs-method><a href=#attr-fs-method>method</a></code>, and <code title=attr-fs-target><a href=#attr-fs-target>target</a></code> attributes are <a href=#form-submission>attributes
+  for form submission</a>.</p>
 
   <p>The <dfn id=attr-button-value title=attr-button-value><code>value</code></dfn>
   attribute gives the element's value for the purposes of form
@@ -27290,7 +27290,7 @@
 
 
 
-  <h4 id=attributes-for-form-submission><span class=secno>4.10.14 </span><dfn>Attributes for form submission</dfn></h4>
+  <h5 id=form-submission><span class=secno>4.10.13.6 </span><dfn title="attributes for form submission">Form submission</dfn></h5>
 
   <p>Attributes for form submission can be specified both on
   <code><a href=#the-form-element>form</a></code> elements and on elements that represent buttons
@@ -27368,9 +27368,9 @@
   
 
 
-  <h4 id=constraints><span class=secno>4.10.15 </span>Constraints</h4>
+  <h4 id=constraints><span class=secno>4.10.14 </span>Constraints</h4>
 
-  <h5 id=definitions><span class=secno>4.10.15.1 </span>Definitions</h5>
+  <h5 id=definitions><span class=secno>4.10.14.1 </span>Definitions</h5>
 
   <p>A <a href=#category-listed title=category-listed>listed form-associated
   element</a> is a <dfn id=candidate-for-constraint-validation>candidate for constraint validation</dfn>
@@ -27380,30 +27380,55 @@
   constraint validation</a> if it is an <code><a href=#the-output-element>output</a></code> or
   <code><a href=#the-fieldset-element>fieldset</a></code> element.)</p>
 
-  <p class=XXX>An element <dfn id=concept-fv-valid title=concept-fv-valid>satisfies its constraints</dfn> if ...</p>
+  <p>An element can be constrained in various ways. The following is
+  the list of ailments that a form control can suffer from, making the
+  control invalid for the purposes of constraint valiation:</p>
 
-  <p class=XXX>... <dfn id=suffering-from-being-missing>suffering from being missing</dfn></p>
+  <dl><dt> <dfn id=suffering-from-being-missing>Suffering from being missing</dfn> </dt>
 
-  <p class=XXX>... <dfn id=suffering-from-a-type-mismatch>suffering from a type
-  mismatch</dfn></p>
+   <dd> <p>When a control has no <a href=#concept-fe-value title=concept-fe-value>value</a> but has a <code title="">required</code> attribute (<code><a href=#the-input-element>input</a></code> <code title=attr-input-required><a href=#attr-input-required>required</a></code>, <code><a href=#the-textarea-element>textarea</a></code>
+   <code title=attr-textarea-required><a href=#attr-textarea-required>required</a></code>). </dd>
 
-  <p class=XXX>... <dfn id=suffering-from-a-pattern-mismatch>suffering from a pattern
-  mismatch</dfn></p>
+   <dt> <dfn id=suffering-from-a-type-mismatch>Suffering from a type mismatch</dfn> </dt>
 
-  <p class=XXX>... <dfn id=suffering-from-being-too-long>suffering from being too
-  long</dfn></p>
+   <dd> <p>When a control that allows arbitrary user input has a <a href=#concept-fe-value title=concept-fe-value>value</a> that is not in the correct
+   syntax (<a href=#e-mail-state title=attr-input-type-email>E-mail</a>, <a href=#url-state title=attr-input-type-url>URL</a>). </dd>
 
-  <p class=XXX>... <dfn id=suffering-from-an-underflow>suffering from an underflow</dfn></p>
+   <dt> <dfn id=suffering-from-a-pattern-mismatch>Suffering from a pattern mismatch</dfn> </dt>
 
-  <p class=XXX>... <dfn id=suffering-from-an-overflow>suffering from an overflow</dfn></p>
+   <dd> <p>When a control has a <a href=#concept-fe-value title=concept-fe-value>value</a> that doesn't satisfy the
+   <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code> attribute.</dd>
 
-  <p class=XXX>... <dfn id=suffering-from-a-step-mismatch>suffering from a step
-  mismatch</dfn></p>
+   <dt> <dfn id=suffering-from-being-too-long>Suffering from being too long</dfn> </dt>
 
+   <dd> <p>When a control has a <a href=#concept-fe-value title=concept-fe-value>value</a> that is too long for the
+   <a href=#attr-fe-maxlength title=attr-fe-maxlength>form control <code title="">maxlength</code> attribute</a> (<code><a href=#the-input-element>input</a></code>
+   <code title=attr-input-maxlength><a href=#attr-input-maxlength>maxlength</a></code>,
+   <code><a href=#the-textarea-element>textarea</a></code> <code title=attr-textarea-maxlength><a href=#attr-textarea-maxlength>maxlength</a></code>). </dd>
 
+   <dt> <dfn id=suffering-from-an-underflow>Suffering from an underflow</dfn> </dt>
 
-  <h5 id=constraint-validation><span class=secno>4.10.15.2 </span>Constraint validation</h5>
+   <dd> <p>When a control has a <a href=#concept-fe-value title=concept-fe-value>value</a> that is too low for the <code title=attr-input-min><a href=#attr-input-min>min</a></code> attribute.</dd>
 
+   <dt> <dfn id=suffering-from-an-overflow>Suffering from an overflow</dfn> </dt>
+
+   <dd> <p>When a control has a <a href=#concept-fe-value title=concept-fe-value>value</a> that is too high for the
+   <code title=attr-input-max><a href=#attr-input-max>max</a></code> attribute.</dd>
+
+   <dt> <dfn id=suffering-from-a-step-mismatch>Suffering from a step mismatch</dfn> </dt>
+
+   <dd> <p>When a control has a <a href=#concept-fe-value title=concept-fe-value>value</a> that doesn't fit the rules
+   given by the <code title=attr-input-step><a href=#attr-input-step>step</a></code>
+   attribute.</dd>
+
+  </dl><p>An element <dfn id=concept-fv-valid title=concept-fv-valid>satisfies its
+  constraints</dfn> if it is not suffering from any of the above
+  ailments.</p>
+
+
+
+  <h5 id=constraint-validation><span class=secno>4.10.14.2 </span>Constraint validation</h5>
+
   <p>When the user agent is required to <dfn id=statically-validate-the-constraints>statically validate the
   constraints</dfn> of <code><a href=#the-form-element>form</a></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
@@ -27482,7 +27507,7 @@
 
    <li><p>Return a <i>negative</i> result.</li>
 
-  </ol><h5 id=the-constraint-validation-api><span class=secno>4.10.15.3 </span>The <dfn>constraint validation API</dfn></h5>
+  </ol><h5 id=the-constraint-validation-api><span class=secno>4.10.14.3 </span>The <dfn>constraint validation API</dfn></h5>
 
   <p>The <dfn id=dom-cva-willvalidate title=dom-cva-willValidate><code>willValidate</code></dfn>
   attribute must return true if an element is a <a href=#candidate-for-constraint-validation>candidate for
@@ -27495,7 +27520,7 @@
   <dfn id=dom-cva-setcustomvalidity title=dom-cva-setCustomValidity><code>setCustomValidity()</code></dfn></p>
 
 
-  <h4 id=form-submission><span class=secno>4.10.16 </span>Form submission</h4>
+  <h4 id=form-submission-0><span class=secno>4.10.15 </span>Form submission</h4>
 
   <!-- XXX http://lxr.mozilla.org/mozilla/source/content/html/content/src/nsHTMLFormElement.cpp -->
 
@@ -27962,7 +27987,7 @@
 
     </dl></li>
 
-  </ol><h5 id=url-encoded-form-data><span class=secno>4.10.16.1 </span>URL-encoded form data</h5>
+  </ol><h5 id=url-encoded-form-data><span class=secno>4.10.15.1 </span>URL-encoded form data</h5>
 
   <p>The <dfn id=application/x-www-form-urlencoded-encoding-algorithm><code title="">application/x-www-form-urlencoded</code> encoding
   algorithm</dfn> is as follows:</p>
@@ -27973,7 +27998,7 @@
    the characters are representable in the submission character
    encoding. -->
 
-  </ol><h5 id=multipart-form-data><span class=secno>4.10.16.2 </span>Multipart form data</h5>
+  </ol><h5 id=multipart-form-data><span class=secno>4.10.15.2 </span>Multipart form data</h5>
 
   <p>The <dfn id=multipart/form-data-encoding-algorithm><code title="">multipart/form-data</code> encoding
   algorithm</dfn> is as follows:</p>
@@ -27984,7 +28009,7 @@
    the characters are representable in the submission character
    encoding. -->
 
-  </ol><h5 id=plain-text-form-data><span class=secno>4.10.16.3 </span>Plain text form data</h5>
+  </ol><h5 id=plain-text-form-data><span class=secno>4.10.15.3 </span>Plain text form data</h5>
 
   <p>The <dfn id=text/plain-encoding-algorithm><code title="">text/plain</code> encoding
   algorithm</dfn> is as follows:</p>
@@ -27995,7 +28020,7 @@
    the characters are representable in the submission character
    encoding. -->
 
-  </ol><h4 id=resetting-a-form><span class=secno>4.10.17 </span>Resetting a form</h4>
+  </ol><h4 id=resetting-a-form><span class=secno>4.10.16 </span>Resetting a form</h4>
 
   <p>When a form <var title="">form</var> is <dfn id=concept-form-reset title=concept-form-reset>reset</dfn>, the user agent must invoke
   the <a href=#concept-form-reset-control title=concept-form-reset-control>reset algorithm</a>
@@ -28009,7 +28034,7 @@
 
 
 
-  <h4 id=event-dispatch><span class=secno>4.10.18 </span>Event dispatch</h4>
+  <h4 id=event-dispatch><span class=secno>4.10.17 </span>Event dispatch</h4>
 
   <p>When the user agent is to <dfn id=broadcast-forminput-events>broadcast <code title=event-forminput>forminput</code> events</dfn> or
   <dfn id=broadcast-formchange-events>broadcast <code title=event-formchange>formchange</code>

Modified: source
===================================================================
--- source	2008-10-10 02:27:14 UTC (rev 2319)
+++ source	2008-10-10 02:54:53 UTC (rev 2320)
@@ -28319,8 +28319,8 @@
   <p>The <code title="attr-fs-action">action</code>, <code
   title="attr-fs-enctype">enctype</code>, <code
   title="attr-fs-method">method</code>, and <code
-  title="attr-fs-target">target</code> attributes control the form
-  submission.</p>
+  title="attr-fs-target">target</code> attributes are <span>attributes
+  for form submission</span>.</p>
 
   <div class="bookkeeping">
 
@@ -28516,8 +28516,8 @@
   <p>The <code title="attr-fs-action">action</code>, <code
   title="attr-fs-enctype">enctype</code>, <code
   title="attr-fs-method">method</code>, and <code
-  title="attr-fs-target">target</code> attributes control the form
-  submission.</p>
+  title="attr-fs-target">target</code> attributes are <span>attributes
+  for form submission</span>.</p>
 
   <div class="bookkeeping">
 
@@ -29491,8 +29491,8 @@
   title="attr-fs-action">action</code>, <code
   title="attr-fs-enctype">enctype</code>, <code
   title="attr-fs-method">method</code>, and <code
-  title="attr-fs-target">target</code> attributes control the form
-  submission.</p>
+  title="attr-fs-target">target</code> attributes are <span>attributes
+  for form submission</span>.</p>
 
   <p>The <dfn title="attr-button-value"><code>value</code></dfn>
   attribute gives the element's value for the purposes of form
@@ -30659,7 +30659,7 @@
 
 
 
-  <h4><dfn>Attributes for form submission</dfn></h4>
+  <h5><dfn title="attributes for form submission">Form submission</dfn></h5>
 
   <p>Attributes for form submission can be specified both on
   <code>form</code> elements and on elements that represent buttons
@@ -30776,29 +30776,70 @@
   constraint validation</span> if it is an <code>output</code> or
   <code>fieldset</code> element.)</p>
 
-  <p class="XXX">An element <dfn
-  title="concept-fv-valid">satisfies its constraints</dfn> if ...</p>
+  <p>An element can be constrained in various ways. The following is
+  the list of ailments that a form control can suffer from, making the
+  control invalid for the purposes of constraint valiation:</p>
 
-  <p class="XXX">... <dfn>suffering from being missing</dfn></p>
+  <dl>
 
-  <p class="XXX">... <dfn>suffering from a type
-  mismatch</dfn></p>
+   <dt> <dfn>Suffering from being missing</dfn> </dt>
 
-  <p class="XXX">... <dfn>suffering from a pattern
-  mismatch</dfn></p>
+   <dd> <p>When a control has no <span
+   title="concept-fe-value">value</span> but has a <code
+   title="">required</code> attribute (<code>input</code> <code
+   title="attr-input-required">required</code>, <code>textarea</code>
+   <code title="attr-textarea-required">required</code>). </p></dd>
 
-  <p class="XXX">... <dfn>suffering from being too
-  long</dfn></p>
+   <dt> <dfn>Suffering from a type mismatch</dfn> </dt>
 
-  <p class="XXX">... <dfn>suffering from an underflow</dfn></p>
+   <dd> <p>When a control that allows arbitrary user input has a <span
+   title="concept-fe-value">value</span> that is not in the correct
+   syntax (<span title="attr-input-type-email">E-mail</span>, <span
+   title="attr-input-type-url">URL</span>). </p></dd>
 
-  <p class="XXX">... <dfn>suffering from an overflow</dfn></p>
+   <dt> <dfn>Suffering from a pattern mismatch</dfn> </dt>
 
-  <p class="XXX">... <dfn>suffering from a step
-  mismatch</dfn></p>
+   <dd> <p>When a control has a <span
+   title="concept-fe-value">value</span> that doesn't satisfy the
+   <code title="attr-input-pattern">pattern</code> attribute.</p></dd>
 
+   <dt> <dfn>Suffering from being too long</dfn> </dt>
 
+   <dd> <p>When a control has a <span
+   title="concept-fe-value">value</span> that is too long for the
+   <span title="attr-fe-maxlength">form control <code
+   title="">maxlength</code> attribute</span> (<code>input</code>
+   <code title="attr-input-maxlength">maxlength</code>,
+   <code>textarea</code> <code
+   title="attr-textarea-maxlength">maxlength</code>). </p></dd>
 
+   <dt> <dfn>Suffering from an underflow</dfn> </dt>
+
+   <dd> <p>When a control has a <span
+   title="concept-fe-value">value</span> that is too low for the <code
+   title="attr-input-min">min</code> attribute.</p></dd>
+
+   <dt> <dfn>Suffering from an overflow</dfn> </dt>
+
+   <dd> <p>When a control has a <span
+   title="concept-fe-value">value</span> that is too high for the
+   <code title="attr-input-max">max</code> attribute.</p></dd>
+
+   <dt> <dfn>Suffering from a step mismatch</dfn> </dt>
+
+   <dd> <p>When a control has a <span
+   title="concept-fe-value">value</span> that doesn't fit the rules
+   given by the <code title="attr-input-step">step</code>
+   attribute.</p></dd>
+
+  </dl>
+
+  <p>An element <dfn title="concept-fv-valid">satisfies its
+  constraints</dfn> if it is not suffering from any of the above
+  ailments.</p>
+
+
+
   <h5>Constraint validation</h5>
 
   <p>When the user agent is required to <dfn>statically validate the




More information about the Commit-Watchers mailing list