[whatwg] Comments on Web Forms 2.0 Working Draft
Ian Hickson
ian at hixie.ch
Wed Jun 16 09:10:29 PDT 2004
On Fri, 11 Jun 2004, Christian Schmidt wrote:
>
> My suggestion about adding an onvalidate event was to make it clear to
> authors when they should do their validation, and also to make the code
> easier to read and understand.
They should do their validation in the onchange (or oninput) event
handlers. I should probably be clearer about that.
> The custom validation could be done in onchange or oninput, but that may
> turn out to be too often or too rare.
Why?
> One UA may choose to only do validation and display errors on form
> submission and when form.validate() is called, while another UA may do
> validation on every keypress (and perhaps show a check mark next to
> valid controls, and a small help icon that shows the error message in a
> tooltip).
They all have to do the validation on submit, according to the spec. They
may also do validation on the fly, but that's why we have oninput and
onchange.
> If validity is the sum of several ERROR_* constants including
> ERROR_USER_DEFINED and the UA only displays the error message related to
> one constant at a time, it would probably make sense to display the one
> set with setCustomValidity() first (it would probably be more specific
> than the standard messages). I don't know whether this behaviour should
> be required by UA's or even suggested in the spec.
Yeah. It's up to the UA.
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg
mailing list