W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2006

[whatwg] Web Forms 2.0 proposal

From: porneL <mailinglist@pornel.net>
Date: Tue, 15 Aug 2006 10:29:49 +0100
Message-ID: <op.tebjbzcjq87dpm@idlaptop02.ideadesigners.local>
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:


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.

regards, porneL
Received on Tuesday, 15 August 2006 02:29:49 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:28 UTC