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

[whatwg] [WebForms2] custom form validation notifications

From: Joao Eiras <joao.eiras@gmail.com>
Date: Mon, 09 Oct 2006 04:17:29 +0100
Message-ID: <op.tg4wrfq6xl3at9@dragast.mshome.net>
Matthew Paul Thomas <mpt at myrealbox.com> escreveu:

> On Oct 4, 2006, at 4:05 PM, Brad Fults wrote:
>>
>> On 10/3/06, Joao Eiras <joao.eiras at gmail.com> wrote:
>>> ...
>>> If the user fills a form in an improper way the UA should alert him of  
>>> the problems. Opera in the early days of its initial web forms support  
>>> showed an alert box stating that the information was invalid, now it  
>>> flashes the input field, and presents a message overlapped in the  
>>> webpage. However it presents a very generic error message like "You  
>>> must set a value!" (for required) or "foo is not in the format this  
>>> page requires" (for pattern). The author may want, in the case of an  
>>> error, to present its custom error message to the end user. This could  
>>> be achieved by declaring new custom attribute for the several  
>>> controls, which could hold the message. The UA could then either pop  
>>> up that message to the user or embed it in the page (like Opera does
>>> currently). The attribute could be named like requirederr, patternerr,  
>>> or use some other sort of naming convention to easily associate the  
>>> constraining property with the message attribute.
>
> As UAs become more sophisticated, they can analyze the pattern attribute  
> and present more context-sensitive error messages than any such  
> attribute could. For example:
> *   "410 is too much; this number must be 300 or less."
> *   "178 is too small; this number must be 200 or more."
> *   "This field must start with a letter."
>
> UAs can also localize these error messages much more extensively than  
> any Web site could (which will be even more of a benefit when the Web  
> site is not in your preferred language).

Of course. Such features are very useful, although such behaviours are  
user-agent defined.
But that's not the point: my original message is related to  
customizablility.

>> Is the use of the title attribute inappropriate for this case?
>> ...
>
> It has the same lack of context.
>
Received on Sunday, 8 October 2006 20:17:29 UTC

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