[Bug 22129] Allowing @pattern attribute on <input type=number>

https://www.w3.org/Bugs/Public/show_bug.cgi?id=22129

--- Comment #6 from Felipe N. Moura <felipenmoura@gmail.com> ---
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > I think the problem with locale is that it will be forcing developers to
> > > chose one of the existing patterns, when offering a pattern attribute would
> > > be more "malleable". Although, it would probably be easier to implement than
> > > specifying a mask.
> > 
> > Why would a developer want to set a format that has no meaning? Should we
> > allow that? Like using X as decimal separator and $ for thousands? If a
> > developer wants to use exotic format that has no meaning, it's not clear to
> > me that using <input type='number'> is the right solution.
> 
> It is not exotic formats!
> As I mentioned, users in Brazil(the current example) are used to different
> currency formats, using "." as thousand separator and "," as decimal
> separator, while float numbers use no separator for thousand, and use "." as
> decimal separator.
> So, it is not exotic, and it is not the "pattarn", and as I mentioned, if I
> type "1.234,56" in an input of type number, it is NOT VALID(both html form
> validation and :invalid are triggered), when it IS valid for us!
> Meanwhile, if a user is supposed to type, let's say, the discount in %, the
> user will type something like "2.5", again, in an input=number, with
> different format, validation and separators(no thousando separator, as well).

Oh, I was forgetting, I think it is important to us to use inputs of type
number for both of those situations(the price and discount, for example),
because they are numbers, so, the enabled mobile keyboard should be the numeric
one, as well as the validation rules. Also, the screen readers should mark it
as numbers.
That's why I think it is supposed to be of type number, and I believe it would
be useful if we could keep its validation more dynamically.
Although, I don't know what/how would it be better to implement such
pattern...I mean, would it be like regular expressions? Maybe something
simpler!

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 23 May 2013 21:52:05 UTC