[whatwg] I dont like "successful"
Olav Junker Kjær
olav at olav.dk
Fri Nov 26 14:41:05 PST 2004
Validation is defined as happening only for successful controls (section
4.4). Because of that, unchecked checkboxes, radiobuttons, and file
fields with no selected files will not be validated. This is bad, since
"required" (and "min") constraints will not be enforced then.
I don't like the property "successful", since it's likely to be
confusing for authors ("what is the difference between valid and
successful?"), and it is of limited use. It's really just a detail about
how to encode the form data set, not something of interest to the page
Also, the WF2 "successful" property is slightly different that in HTML4,
where it seem to be defined per value rather that per control. E.g. in
HTML4 each selected option in a select multiple list are considered
successful, while in WF2 "successful" is a property of the select
element rather than the option elements.
Maybe the spec could instead use the term "validatable controls". The
validatable controls is TEXTAREA, SELECT and all INPUT-types except the
buttons and the image type.
When a form submission is initiated (or validate() is called),
validation is performed on all non-disabled validatable controls in the
forms elements collection.
If none had errors, the dataset is generated from the validated controls
plus the control that initiated the submission. Each control may
generate none, one, or several name-value-index triplets in the dataset,
dependent on the type and state of the control.
I dont know if this is less confusing?
Olav Junker Kjær
More information about the whatwg