[whatwg] Web Forms 2.0 proposal

On Sat, 11 Feb 2006, Sean Hogan 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="" 
attribute. That is, the behaviour you describe is behaviour that browsers 
are allowed to implement when authors use the pattern="" attribute, to 
ensure that the user can't type in invalid values.

It isn't required, because, as you point out, this is a UI issue.

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

Received on Monday, 14 August 2006 16:57:15 UTC