Skip to content

Commit

Permalink
[] (0) WF2: Define the ailments for a form control.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@2320 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 10, 2008
1 parent 9afc704 commit 51956f0
Show file tree
Hide file tree
Showing 2 changed files with 128 additions and 62 deletions.
109 changes: 67 additions & 42 deletions index
Expand Up @@ -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>
Expand Down Expand Up @@ -22713,7 +22713,7 @@ function AddCloud(data, x, y) { ... }</pre>
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>
Expand Down Expand Up @@ -25402,8 +25402,8 @@ function AddCloud(data, x, y) { ... }</pre>
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>

Expand Down Expand Up @@ -25553,8 +25553,8 @@ function AddCloud(data, x, y) { ... }</pre>
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>

Expand Down Expand Up @@ -26336,8 +26336,8 @@ function AddCloud(data, x, y) { ... }</pre>
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
Expand Down Expand Up @@ -27290,7 +27290,7 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme



<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
Expand Down Expand Up @@ -27368,9 +27368,9 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme



<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>
Expand All @@ -27380,29 +27380,54 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme
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>

<dl><dt> <dfn id=suffering-from-being-missing>Suffering from being missing</dfn> </dt>

<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>

<dt> <dfn id=suffering-from-a-type-mismatch>Suffering from a type mismatch</dfn> </dt>

<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>

<dt> <dfn id=suffering-from-a-pattern-mismatch>Suffering from a pattern mismatch</dfn> </dt>

<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>

<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>

<p class=XXX>... <dfn id=suffering-from-being-missing>suffering from being missing</dfn></p>
<dt> <dfn id=suffering-from-an-underflow>Suffering from an underflow</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 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>

<p class=XXX>... <dfn id=suffering-from-a-pattern-mismatch>suffering from a pattern
mismatch</dfn></p>
<dt> <dfn id=suffering-from-an-overflow>Suffering from an overflow</dfn> </dt>

<p class=XXX>... <dfn id=suffering-from-being-too-long>suffering from being too
long</dfn></p>
<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>

<p class=XXX>... <dfn id=suffering-from-an-underflow>suffering from an underflow</dfn></p>
<dt> <dfn id=suffering-from-a-step-mismatch>Suffering from a step 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 fit the rules
given by the <code title=attr-input-step><a href=#attr-input-step>step</a></code>
attribute.</dd>

<p class=XXX>... <dfn id=suffering-from-a-step-mismatch>suffering from a step
mismatch</dfn></p>
</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.15.2 </span>Constraint validation</h5>
<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
Expand Down Expand Up @@ -27482,7 +27507,7 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme

<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
Expand All @@ -27495,7 +27520,7 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme
<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 -->

Expand Down Expand Up @@ -27962,7 +27987,7 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme

</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>
Expand All @@ -27973,7 +27998,7 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme
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>
Expand All @@ -27984,7 +28009,7 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme
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>
Expand All @@ -27995,7 +28020,7 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme
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>
Expand All @@ -28009,7 +28034,7 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme



<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>
Expand Down

0 comments on commit 51956f0

Please sign in to comment.