[whatwg] Form element invalid message
mounir.lamouri at gmail.com
Wed Sep 22 14:32:57 PDT 2010
(Re-sending this email which was only addressed to Aryeh by mistake.)
On 09/21/2010 09:43 PM, Aryeh Gregor wrote:
> I think only Opera has UI at all), so it's best to just
> not use it for now.
Firefox nightlies too. Will be in Firefox 4 beta 7.
On 09/21/2010 10:35 PM, Shiv Kumar wrote:
>> That doesn't seem cryptic to me.
> Come now Aryeh :). Imagine this scenario. On a web page/form, I'm
asking the user to enter her social security number and she sees a
message "You have to specify a value", you're saying that sounds ok to
you? Oh, and the next browser will say something like, "This is a
required field". What then?
If the problem is the user didn't enter a value and the value is
required, this message is probably the best.
If the user wrote something which doesn't follow the SSN pattern, then,
the message should be different (assuming the pattern attribute was
used!). In that case, the message could be a generic one (like "The
value doesn't follow the given pattern" or anything like that). However,
specifications say you can use @title to add informations about pattern.
In that case, the UA might add this message in the validation message.
It could be something like "The entered value is not valid: you have to
enter a SSN number" with title="you have to enter a SSN number".
When the element is suffering from a pattern mismatch, it's the only
case where it's hard to say what is exactly wrong. That's why @title is
used. Do not expect @title to be used in other validation messages.
More information about the whatwg