Re: [html5] input type=time & min/max.

On Sat, 19 Sep 2009, Andrew Fedoniouk wrote:
> > >
> > > Shall the whole input be e.g. disabled or it should allow the input 
> > > anyway?
> > 
> > The spec does not say it should be disabled because of this.
> 
> This imply that no constraint check is required at real time, correct? 
> In other words the only required check is submission/validation time 
> check.

Well the :invalid CSS pseudo-class applies in real time, if that's what 
you mean.


> But at the same time we have this:
> "User agents must not allow the user to set the value to a string that is not
> a valid time string."[1].
> 
> Seems like it is about just-in-time checks, no?

The term "valid time string" refers to the syntax of the value, not the 
actual value relative to the min and max attributes.


> In any case you cannot input time without breaking this rule.

The input UI doesn't have to be a realtime editor of the underlying value 
-- in fact it can't, if you allow freeform input.


> Partial time input in most cases is not a valid time.

Yup, if you allow freeform input, then the underlying value only gets 
updated when the input is an actual valid time string.


> > If validation is enabled, then the form can't be submitted.
> 
> So in this particular case the form containing such an input will always 
> be non-submittable, correct?

Unless the form has novalidate set or the submit button has formnovalidate 
set, yes.


> As far as I understand form validation algorithm does not have feature 
> like "submit anyway".

There's formnovalidate buttons, and .submit() doesn't check.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Sunday, 20 September 2009 09:23:20 UTC