[whatwg] Web Forms 2.0 proposal
porneL
mailinglist at pornel.net
Tue Aug 15 02:29:49 PDT 2006
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.
--
regards, porneL
More information about the whatwg
mailing list