Skip to content

Commit

Permalink
[] (0) WF2: required constraint.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@2273 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 3, 2008
1 parent 27daf51 commit 64a8bdf
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 23 deletions.
49 changes: 36 additions & 13 deletions index
Expand Up @@ -22872,9 +22872,9 @@ function AddCloud(data, x, y) { ... }</pre>

<p>For example, on platforms where clicking a checkbox label checks
the checkbox, clicking the <code><a href=#the-label-element>label</a></code> in the following
snippet could trigger the user agent to <span>run synthetic click
activation steps on the <code><a href=#the-input-element>input</a></code> element, as if
the element itself had been triggered by the user:</span></p>
snippet could trigger the user agent to <a href=#run-synthetic-click-activation-steps>run synthetic click
activation steps</a> on the <code><a href=#the-input-element>input</a></code> element, as if
the element itself had been triggered by the user:</p>

<pre>&lt;label&gt;&lt;input type=checkbox name=lost&gt; Lost&lt;/label&gt;</pre>

Expand Down Expand Up @@ -23409,7 +23409,7 @@ function AddCloud(data, x, y) { ... }</pre>
<!-- <td class="yes"> Yes Time -->
<td class=yes> Yes <!-- Local Date and Time -->
<!-- <td class="yes"> Yes Number -->
<td class=yes> Yes <!-- Range -->
<td class=no> &middot; <!-- Range -->
<td class=yes> Yes <!-- Checkbox -->
<!-- <td class="yes"> Yes Radio Button -->
<td class=yes> Yes <!-- File -->
Expand Down Expand Up @@ -23801,8 +23801,8 @@ function AddCloud(data, x, y) { ... }</pre>
serialisation. e.g. should it be 2008-01-01T00:00 or
2008-01-01t00:00? should it be 1e2 or 100? -->

<!-- XXX for each of these, need to say when to fire oninput,
onchange, and when required='' is satisfied -->
<!-- XXX for each of these, need to say when to fire oninput and
onchange -->



Expand Down Expand Up @@ -24936,8 +24936,7 @@ function AddCloud(data, x, y) { ... }</pre>
<code title=attr-input-autocomplete><a href=#attr-input-autocomplete>autocomplete</a></code>,
<code title=attr-input-list><a href=#attr-input-list>list</a></code>,
<code title=attr-input-max><a href=#attr-input-max>max</a></code>,
<code title=attr-input-min><a href=#attr-input-min>min</a></code>,
<code title=attr-input-required><a href=#attr-input-required>required</a></code>, and
<code title=attr-input-min><a href=#attr-input-min>min</a></code>, and
<code title=attr-input-step><a href=#attr-input-step>step</a></code> content attributes;
<code title=dom-input-list><a href=#dom-input-list>list</a></code>,
<code title=dom-input-value><a href=#dom-input-value>value</a></code>,
Expand All @@ -24960,6 +24959,7 @@ function AddCloud(data, x, y) { ... }</pre>
<code class=no-backref title=attr-fs-method><a href=#attr-fs-method>method</a></code>,
<code class=no-backref title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code>,
<code class=no-backref title=attr-input-readonly><a href=#attr-input-readonly>readonly</a></code>,
<code class=no-backref title=attr-input-required><a href=#attr-input-required>required</a></code>,
<code class=no-backref title=attr-input-size><a href=#attr-input-size>size</a></code>,
<code class=no-backref title=attr-input-src><a href=#attr-input-src>src</a></code>, and
<code class=no-backref title=attr-fs-target><a href=#attr-fs-target>target</a></code>.</p>
Expand All @@ -24984,7 +24984,10 @@ function AddCloud(data, x, y) { ... }</pre>
<p>If the element is <i title=concept-input-mutable><a href=#concept-input-mutable>mutable</a></i>,
the user should allow the user to toggle the <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> state.</p>

<!-- XXX event timing; acivation behavior -->
<p><strong>Constraint validation:</strong> If the element is <i title=concept-input-required><a href=#concept-input-required>required</a></i> and its <span title=concept-fe-checkedness>checkedness</span> is false, then the
element is <a href=#suffering-from-being-missing>suffering from being missing</a>.</p>

<!-- XXX event timing; activation behavior -->

<p><strong>The <a href=#value-sanitization-algorithm>value sanitization algorithm</a> is as
follows:</strong> Do nothing.</p>
Expand Down Expand Up @@ -25064,8 +25067,6 @@ function AddCloud(data, x, y) { ... }</pre>
the user should allow the user to set the <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> state of the
element to true.</p>

<!-- XXX event timing; acivation behavior -->

<p>When any of the following events occur, if the element's <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> state is true after
the event, the <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> state of all the
other elements in the same <i><a href=#radio-button-group>radio button group</a></i> must be set to
Expand All @@ -25080,7 +25081,15 @@ function AddCloud(data, x, y) { ... }</pre>

<li>The element's <a href=#form-owner>form owner</a> changes.</li>

</ul><p><strong>The <a href=#value-sanitization-algorithm>value sanitization algorithm</a> is as
</ul><p><strong>Constraint validation:</strong> If the element is <i title=concept-input-required><a href=#concept-input-required>required</a></i> and all of the
<code><a href=#the-input-element>input</a></code> elements in the <i><a href=#radio-button-group>radio button group</a></i> have a
<span title=concept-fe-checkedness>checkedness</span> that is
false, then the element is <a href=#suffering-from-being-missing>suffering from being
missing</a>.</p>

<!-- XXX event timing; activation behavior -->

<p><strong>The <a href=#value-sanitization-algorithm>value sanitization algorithm</a> is as
follows:</strong> Do nothing.</p>

<p>The following common <code><a href=#the-input-element>input</a></code> element content
Expand Down Expand Up @@ -25165,6 +25174,10 @@ function AddCloud(data, x, y) { ... }</pre>

<p class=XXX>... list of <dfn id=concept-input-type-file-selected title=concept-input-type-file-selected>selected files</dfn></p>

<p><strong>Constraint validation:</strong> If the element is <i title=concept-input-required><a href=#concept-input-required>required</a></i> and the list of <a href=#concept-input-type-file-selected title=concept-input-type-file-selected>selected files</a> is
empty, then the element is <a href=#suffering-from-being-missing>suffering from being
missing</a>.</p>



<h6 id=submit-button-state><span class=secno>4.10.4.1.17 </span><dfn title=attr-input-type-submit>Submit Button</dfn> state</h6>
Expand Down Expand Up @@ -25470,7 +25483,15 @@ function AddCloud(data, x, y) { ... }</pre>

<h6 id=the-required-attribute><span class=secno>4.10.4.2.5 </span>The <code title=attr-input-required><a href=#attr-input-required>required</a></code> attribute</h6>

<p class=XXX>... <dfn id=attr-input-required title=attr-input-required><code>required</code></dfn></p>
<p>The <dfn id=attr-input-required title=attr-input-required><code>required</code></dfn>
attribute is a <a href=#boolean-attribute>boolean attribute</a>. When specified, the
element is <dfn id=concept-input-required title=concept-input-required><i>required</i></dfn>.</p>

<p><strong>Constraint validation:</strong> If the element is <i title=concept-input-required><a href=#concept-input-required>required</a></i>, and its <code title=dom-input-value><a href=#dom-input-value>value</a></code> DOM attribute applies and is in
the mode <a href=#dom-input-value-value title=dom-input-value-value>value</a>, and the
element's <a href=#concept-fe-value title=concept-fe-value>value</a> is the empty
string, then the element is <a href=#suffering-from-being-missing>suffering from being
missing</a>.</p>



Expand Down Expand Up @@ -26325,6 +26346,8 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme

<p class=XXX>An element <dfn id=concept-fv-valid title=concept-fv-valid>satisfies its constraints</dfn> if ...</p>

<p class=XXX>... <dfn id=suffering-from-being-missing>suffering from being missing</dfn></p>

<p class=XXX>... <dfn id=suffering-from-a-type-mismatch>suffering from a type
mismatch</dfn></p>

Expand Down
51 changes: 41 additions & 10 deletions source
Expand Up @@ -25376,7 +25376,7 @@ function AddCloud(data, x, y) { ... }</pre>
<p>For example, on platforms where clicking a checkbox label checks
the checkbox, clicking the <code>label</code> in the following
snippet could trigger the user agent to <span>run synthetic click
activation steps</psna> on the <code>input</code> element, as if
activation steps</span> on the <code>input</code> element, as if
the element itself had been triggered by the user:</p>

<pre>&lt;label>&lt;input type=checkbox name=lost> Lost&lt;/label></pre>
Expand Down Expand Up @@ -25989,7 +25989,7 @@ function AddCloud(data, x, y) { ... }</pre>
<!-- <td class="yes"> Yes Time -->
<td class="yes"> Yes <!-- Local Date and Time -->
<!-- <td class="yes"> Yes Number -->
<td class="yes"> Yes <!-- Range -->
<td class="no"> &middot; <!-- Range -->
<td class="yes"> Yes <!-- Checkbox -->
<!-- <td class="yes"> Yes Radio Button -->
<td class="yes"> Yes <!-- File -->
Expand Down Expand Up @@ -26450,8 +26450,8 @@ function AddCloud(data, x, y) { ... }</pre>
serialisation. e.g. should it be 2008-01-01T00:00 or
2008-01-01t00:00? should it be 1e2 or 100? -->

<!-- XXX for each of these, need to say when to fire oninput,
onchange, and when required='' is satisfied -->
<!-- XXX for each of these, need to say when to fire oninput and
onchange -->



Expand Down Expand Up @@ -27747,8 +27747,7 @@ function AddCloud(data, x, y) { ... }</pre>
<code title="attr-input-autocomplete">autocomplete</code>,
<code title="attr-input-list">list</code>,
<code title="attr-input-max">max</code>,
<code title="attr-input-min">min</code>,
<code title="attr-input-required">required</code>, and
<code title="attr-input-min">min</code>, and
<code title="attr-input-step">step</code> content attributes;
<code title="dom-input-list">list</code>,
<code title="dom-input-value">value</code>,
Expand All @@ -27771,6 +27770,7 @@ function AddCloud(data, x, y) { ... }</pre>
<code class="no-backref" title="attr-fs-method">method</code>,
<code class="no-backref" title="attr-input-pattern">pattern</code>,
<code class="no-backref" title="attr-input-readonly">readonly</code>,
<code class="no-backref" title="attr-input-required">required</code>,
<code class="no-backref" title="attr-input-size">size</code>,
<code class="no-backref" title="attr-input-src">src</code>, and
<code class="no-backref" title="attr-fs-target">target</code>.</p>
Expand Down Expand Up @@ -27799,7 +27799,12 @@ function AddCloud(data, x, y) { ... }</pre>
the user should allow the user to toggle the <span
title="concept-fe-checked">checkedness</span> state.</p>

<!-- XXX event timing; acivation behavior -->
<p><strong>Constraint validation:</strong> If the element is <i
title="concept-input-required">required</i> and its <span
title="concept-fe-checkedness">checkedness</span> is false, then the
element is <span>suffering from being missing</span>.</p>

<!-- XXX event timing; activation behavior -->

<p><strong>The <span>value sanitization algorithm</span> is as
follows:</strong> Do nothing.</p>
Expand Down Expand Up @@ -27891,8 +27896,6 @@ function AddCloud(data, x, y) { ... }</pre>
title="concept-fe-checked">checkedness</span> state of the
element to true.</p>

<!-- XXX event timing; acivation behavior -->

<p>When any of the following events occur, if the element's <span
title="concept-fe-checked">checkedness</span> state is true after
the event, the <span
Expand All @@ -27914,6 +27917,15 @@ function AddCloud(data, x, y) { ... }</pre>

</ul>

<p><strong>Constraint validation:</strong> If the element is <i
title="concept-input-required">required</i> and all of the
<code>input</code> elements in the <i>radio button group</i> have a
<span title="concept-fe-checkedness">checkedness</span> that is
false, then the element is <span>suffering from being
missing</span>.</p>

<!-- XXX event timing; activation behavior -->

<p><strong>The <span>value sanitization algorithm</span> is as
follows:</strong> Do nothing.</p>

Expand Down Expand Up @@ -28005,6 +28017,12 @@ function AddCloud(data, x, y) { ... }</pre>

<p class="XXX">... list of <dfn title="concept-input-type-file-selected">selected files</dfn></p>

<p><strong>Constraint validation:</strong> If the element is <i
title="concept-input-required">required</i> and the list of <span
title="concept-input-type-file-selected">selected files</span> is
empty, then the element is <span>suffering from being
missing</span>.</p>



<h6><dfn title="attr-input-type-submit">Submit Button</dfn> state</h6>
Expand Down Expand Up @@ -28336,7 +28354,18 @@ function AddCloud(data, x, y) { ... }</pre>

<h6>The <code title="attr-input-required">required</code> attribute</h6>

<p class="XXX">... <dfn title="attr-input-required"><code>required</code></dfn></p>
<p>The <dfn title="attr-input-required"><code>required</code></dfn>
attribute is a <span>boolean attribute</span>. When specified, the
element is <dfn
title="concept-input-required"><i>required</i></dfn>.</p>

<p><strong>Constraint validation:</strong> If the element is <i
title="concept-input-required">required</i>, and its <code
title="dom-input-value">value</code> DOM attribute applies and is in
the mode <span title="dom-input-value-value">value</span>, and the
element's <span title="concept-fe-value">value</span> is the empty
string, then the element is <span>suffering from being
missing</span>.</p>



Expand Down Expand Up @@ -29364,6 +29393,8 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
<p class="XXX">An element <dfn
title="concept-fv-valid">satisfies its constraints</dfn> if ...</p>

<p class="XXX">... <dfn>suffering from being missing</dfn></p>

<p class="XXX">... <dfn>suffering from a type
mismatch</dfn></p>

Expand Down

0 comments on commit 64a8bdf

Please sign in to comment.