[whatwg] Web Forms 2.0 proposal

On Tue, 15 Aug 2006, porneL wrote:
>
> On Tue, 15 Aug 2006 00:57:15 +0100, Ian Hickson <ian at hixie.ch> wrote:
> 
> > > If I'm reading the spec correctly then "pattern" is used to prevent/allow
> > > form
> > > submission, and to highlight an invalid entry.
> > > 
> > > What I am suggesting is a filter that can be matched against for each
> > > keypress
> > > event. If keyCode matches then the character is appended to the input as
> > > normal. If it doesn't then the character is dropped on the floor.
> > 
> > A user agent would be allowed to do that in response to the pattern=""
> 
> I'm afraid that is a difficult thing to implement. Partial string may not
> match pattern even if full would. For example:
> 
> pattern=".."
> 
> I this case user couldn't type anything, because first character won't match
> requirement of having two characters.
> 
> To handle this properly UAs would need to modify their regexp engines.

Yes, implementing this would be non-trivial. I'm just saying it would be 
allowed.

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

Received on Tuesday, 15 August 2006 02:26:57 UTC