W3C home > Mailing lists > Public > www-forms@w3.org > July 2001

Validation Error Messages

From: Ryan Tomayko <rtomayko@columbus.rr.com>
Date: Tue, 3 Jul 2001 08:35:13 -0400
To: <www-forms@w3.org>
Message-ID: <000601c103bc$9bb219c0$7c261841@SPOCK>

I would like to suggest facilities for attaching a caption or descriptive
message to data model validation or individual ui controls. In essence, the
message would describe the validation error that occured. This is necessary
if a descriptive message is to be given to the user when a field fails

For instance, if I have a textbox that's bound to a model item with date
type restraints and the user enters a decimal, how does the processor know
to tell the user, "PO Date must be a date with format: MM/DD/YYYY"? This
message can broken down into two primary parts: First, the validation
message, which specifies the invalid aspects of the data (e.g. "must be a
date with format: MM/DD/YYYY"). Second, the individual form control that
generated the invalid data (e.g. "PO Date").

Seperating these allows the same validation message to be attached to many
ui controls, which is the general data model idea. Thus, it seems reasonable
to extend the data model syntax to accept a "message" attribute. So, to
illustrate how the above example might look, consider:

			name='date' ...
			xf:message='%c must be a date with format MM/DD/YYYY'/>

<textbox ref='po/info/date'>
	<caption>PO Date</caption>

The textbox is bound to the instance value at XPath "po/info/date", and the
instance value is somehow associated with the (really bad example of a)
simpleType within the model. When the processor comes across this textbox
and finds that the value entered does not meet the validation requirements,
it will display the appropriate message and interpolate the %c with the the
<caption> of the control.

Obviously the idea's contained in this email need some work but it seems
that excluding this as a functional would make giving the user a helpful
error message very hard for the processor as it would have to resort to some
form of deduction to build an error message which would probably be very
user-unfriendly (i.e. "PO Date must match regular expression pattern:


Ryan Tomayko <mailto:rtomayko@stercomm.com>
Sterling Commerce
Received on Tuesday, 3 July 2001 08:41:03 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:04 UTC