From 51956f0186b25c22d9281382d8abcc53ec251997 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Fri, 10 Oct 2008 02:54:53 +0000 Subject: [PATCH] [] (0) WF2: Define the ailments for a form control. git-svn-id: http://svn.whatwg.org/webapps@2320 340c8d12-0b0e-0410-8428-c7bf67bfef74 --- index | 109 +++++++++++++++++++++++++++++++++++---------------------- source | 81 +++++++++++++++++++++++++++++++----------- 2 files changed, 128 insertions(+), 62 deletions(-) diff --git a/index b/index index ee48a1e900a..58e350311c7 100644 --- a/index +++ b/index @@ -549,20 +549,20 @@
  • 4.10.13.2 Enabling and disabling form controls
  • 4.10.13.3 A form control's value
  • 4.10.13.4 Autofocusing a form control
  • -
  • 4.10.13.5 Limiting user input length
  • -
  • 4.10.14 Attributes for form submission
  • -
  • 4.10.15 Constraints +
  • 4.10.13.5 Limiting user input length
  • +
  • 4.10.13.6 Form submission
  • +
  • 4.10.14 Constraints
      -
    1. 4.10.15.1 Definitions
    2. -
    3. 4.10.15.2 Constraint validation
    4. -
    5. 4.10.15.3 The constraint validation API
  • -
  • 4.10.16 Form submission +
  • 4.10.14.1 Definitions
  • +
  • 4.10.14.2 Constraint validation
  • +
  • 4.10.14.3 The constraint validation API
  • +
  • 4.10.15 Form submission
      -
    1. 4.10.16.1 URL-encoded form data
    2. -
    3. 4.10.16.2 Multipart form data
    4. -
    5. 4.10.16.3 Plain text form data
  • -
  • 4.10.17 Resetting a form
  • -
  • 4.10.18 Event dispatch
  • +
  • 4.10.15.1 URL-encoded form data
  • +
  • 4.10.15.2 Multipart form data
  • +
  • 4.10.15.3 Plain text form data
  • +
  • 4.10.16 Resetting a form
  • +
  • 4.10.17 Event dispatch
  • 4.11 Interactive elements
    1. 4.11.1 The details element
    2. @@ -22713,7 +22713,7 @@ function AddCloud(data, x, y) { ... } empty string, and the value must be unique amongst the form elements in the forms collection that it is in, if any.

      -

      The action, enctype, method, and target attributes are attributes +

      The action, enctype, method, and target attributes are attributes for form submission.

      The accept-charset @@ -25402,8 +25402,8 @@ function AddCloud(data, x, y) { ... } owner from the input element; otherwise, it is to do nothing.

      -

      The action, enctype, method, and target attributes control the form - submission.

      +

      The action, enctype, method, and target attributes are attributes + for form submission.

      @@ -25553,8 +25553,8 @@ function AddCloud(data, x, y) { ... } equal to zero, and less than or equal to the rendered height, in CSS pixels, of the image.

      -

      The action, enctype, method, and target attributes control the form - submission.

      +

      The action, enctype, method, and target attributes are attributes + for form submission.

      @@ -26336,8 +26336,8 @@ function AddCloud(data, x, y) { ... } attribute represents the element's name. The disabled attribute is used to make the control non-interactive and to prevent its value from being submitted. The autofocus - attribute controls focus. The action, enctype, method, and target attributes control the form - submission.

      + attribute controls focus. The action, enctype, method, and target attributes are attributes + for form submission.

      The value attribute gives the element's value for the purposes of form @@ -27290,7 +27290,7 @@ interface HTMLOptionElement : 4.10.14 Attributes for form submission +

      4.10.13.6 Form submission

      Attributes for form submission can be specified both on form elements and on elements that represent buttons @@ -27368,9 +27368,9 @@ interface HTMLOptionElement : 4.10.15 Constraints +

      4.10.14 Constraints

      -
      4.10.15.1 Definitions
      +
      4.10.14.1 Definitions

      A listed form-associated element is a candidate for constraint validation @@ -27380,29 +27380,54 @@ interface HTMLOptionElement : if it is an output or fieldset element.)

      -

      An element satisfies its constraints if ...

      +

      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:

      + +
      Suffering from being missing
      + +

      When a control has no value but has a required attribute (input required, textarea + required).

      + +
      Suffering from a type mismatch
      + +

      When a control that allows arbitrary user input has a value that is not in the correct + syntax (E-mail, URL).

      + +
      Suffering from a pattern mismatch
      + +

      When a control has a value that doesn't satisfy the + pattern attribute.

      + +
      Suffering from being too long
      + +

      When a control has a value that is too long for the + form control maxlength attribute (input + maxlength, + textarea maxlength).

      -

      ... suffering from being missing

      +
      Suffering from an underflow
      -

      ... suffering from a type - mismatch

      +

      When a control has a value that is too low for the min attribute.

      -

      ... suffering from a pattern - mismatch

      +
      Suffering from an overflow
      -

      ... suffering from being too - long

      +

      When a control has a value that is too high for the + max attribute.

      -

      ... suffering from an underflow

      +
      Suffering from a step mismatch
      -

      ... suffering from an overflow

      +

      When a control has a value that doesn't fit the rules + given by the step + attribute.

      -

      ... suffering from a step - mismatch

      +

      An element satisfies its + constraints if it is not suffering from any of the above + ailments.

      -
      4.10.15.2 Constraint validation
      +
      4.10.14.2 Constraint validation

      When the user agent is required to statically validate the constraints of form element form, it must run the following steps, which return @@ -27482,7 +27507,7 @@ interface HTMLOptionElement :

      Return a negative result. -

    4.10.15.3 The constraint validation API
    +
    4.10.14.3 The constraint validation API

    The willValidate attribute must return true if an element is a candidate for @@ -27495,7 +27520,7 @@ interface HTMLOptionElement : setCustomValidity()

    -

    4.10.16 Form submission

    +

    4.10.15 Form submission

    @@ -27962,7 +27987,7 @@ interface HTMLOptionElement :
  • -
    4.10.16.1 URL-encoded form data
    +
    4.10.15.1 URL-encoded form data

    The application/x-www-form-urlencoded encoding algorithm is as follows:

    @@ -27973,7 +27998,7 @@ interface HTMLOptionElement :
    -
    4.10.16.2 Multipart form data
    +
    4.10.15.2 Multipart form data

    The multipart/form-data encoding algorithm is as follows:

    @@ -27984,7 +28009,7 @@ interface HTMLOptionElement :
    -
    4.10.16.3 Plain text form data
    +
    4.10.15.3 Plain text form data

    The text/plain encoding algorithm is as follows:

    @@ -27995,7 +28020,7 @@ interface HTMLOptionElement :
    -

    4.10.17 Resetting a form

    +

    4.10.16 Resetting a form

    When a form form is reset, the user agent must invoke the reset algorithm @@ -28009,7 +28034,7 @@ interface HTMLOptionElement : 4.10.18 Event dispatch +

    4.10.17 Event dispatch

    When the user agent is to broadcast forminput events or broadcast formchange diff --git a/source b/source index d041f85ef31..8c4a8f1ed0d 100644 --- a/source +++ b/source @@ -28319,8 +28319,8 @@ function AddCloud(data, x, y) { ... }

    The action, enctype, method, and target attributes control the form - submission.

    + title="attr-fs-target">target attributes are attributes + for form submission.

    @@ -28516,8 +28516,8 @@ function AddCloud(data, x, y) { ... }

    The action, enctype, method, and target attributes control the form - submission.

    + title="attr-fs-target">target attributes are attributes + for form submission.

    @@ -29491,8 +29491,8 @@ function AddCloud(data, x, y) { ... } title="attr-fs-action">action, enctype, method, and target attributes control the form - submission.

    + title="attr-fs-target">target attributes are attributes + for form submission.

    The value attribute gives the element's value for the purposes of form @@ -30659,7 +30659,7 @@ interface HTMLOptionElement : HTMLElement { -

    Attributes for form submission

    +
    Form submission

    Attributes for form submission can be specified both on form elements and on elements that represent buttons @@ -30776,26 +30776,67 @@ interface HTMLOptionElement : HTMLElement { constraint validation if it is an output or fieldset element.)

    -

    An element satisfies its constraints if ...

    +

    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:

    + +
    + +
    Suffering from being missing
    + +

    When a control has no value but has a required attribute (input required, textarea + required).

    -

    ... suffering from being missing

    +
    Suffering from a type mismatch
    -

    ... suffering from a type - mismatch

    +

    When a control that allows arbitrary user input has a value that is not in the correct + syntax (E-mail, URL).

    -

    ... suffering from a pattern - mismatch

    +
    Suffering from a pattern mismatch
    -

    ... suffering from being too - long

    +

    When a control has a value that doesn't satisfy the + pattern attribute.

    -

    ... suffering from an underflow

    +
    Suffering from being too long
    -

    ... suffering from an overflow

    +

    When a control has a value that is too long for the + form control maxlength attribute (input + maxlength, + textarea maxlength).

    + +
    Suffering from an underflow
    + +

    When a control has a value that is too low for the min attribute.

    + +
    Suffering from an overflow
    + +

    When a control has a value that is too high for the + max attribute.

    + +
    Suffering from a step mismatch
    + +

    When a control has a value that doesn't fit the rules + given by the step + attribute.

    + +
    -

    ... suffering from a step - mismatch

    +

    An element satisfies its + constraints if it is not suffering from any of the above + ailments.