W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2004

[whatwg] Comments on Web Forms 2.0 Working Draft

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 16 Jun 2004 16:10:29 +0000 (UTC)
Message-ID: <Pine.LNX.4.58.0406161602290.3928@dhalsim.dreamhost.com>
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.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 16 June 2004 09:10:29 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:34 UTC