- From: Olav Junker Kjær <olav@olav.dk>
- Date: Fri, 26 Nov 2004 23:41:05 +0100
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 author. 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
Received on Friday, 26 November 2004 14:41:05 UTC