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

[whatwg] [WebForms2] custom form validation notifications

From: Matthew Paul Thomas <mpt@myrealbox.com>
Date: Mon, 9 Oct 2006 11:32:13 +1300
Message-ID: <dd924299b3f7427da183b7cf9951d52f@myrealbox.com>
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).

> Is the use of the title attribute inappropriate for this case?
> ...

It has the same lack of context.

Matthew Paul Thomas
Received on Sunday, 8 October 2006 15:32:13 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:48 UTC