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

RE: Validation Error Messages

From: Ryan Tomayko <rtomayko@columbus.rr.com>
Date: Wed, 4 Jul 2001 02:47:43 -0400
To: <www-forms@w3.org>
Message-ID: <000101c10455$3aa24990$7c261841@SPOCK>
Very nice. I really like the catch-all touch. However, there are two things
that I should point out that may or may not matter.

1.) This introduces another level of modularity by separating validation
messages from both the model and the individual ui control elements. It kind
of sits in the middle, which makes sense conceptually but may introduce
unwanted complexity.

2.) By using the type names as the names of elements it makes it hard to
attach strict Schema info to the messages element and children. Moving the
type names to use an attribute might be a good idea. Also you could make the
attribute a QName list type allowing the message to apply to multiple types.

<messages locale='EN'>
	<message types='startDate'>
		<facet type='required'>startDate is required.</facet>
		<facet type='max'>...</facet>
	<message types='startDate endDate'>
		<facet type='pattern'>bla bla</facet>

This mods your facet failed search to something like:


- Ryan

> -----Original Message-----
> From: Niall Smart [mailto:regkey@yahoo.com]
> Sent: Tuesday, July 03, 2001 9:14 AM
> To: ryant@mad.scientist.com; www-forms@w3.org
> Subject: Re: Validation Error Messages
> --- Ryan Tomayko <rtomayko@columbus.rr.com> wrote:
> > 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
> > validation.
> I had also been thinking about this, but came up with a
> different model to
> the one you are proposing.  My approach allows different
> messages to be
> displayed depending on which facet has not been complied
> with.  For example,
> given this model:
> <model>
>     <date name="startDate" required="true" max="endDate">
>     <date name="endDate" required="true" min="startDate">
> </model>
> then the error messages would be associated with the model using the
> following syntax:
> <messages locale="EN">
>     <startDate>
>         <required>You must enter a start date.</required>
>         <max>The start date must be before the end date.</max>
>     </startDate>
>     <endDate>
>         <required>You must enter an end date.</required>
>         <min>The end date must be after the start date.</max>
>     </endDate>
>     <required>You have not entered a mandatory field.</required>
> </messages>
> In the event of a facet f on model item with path p not being complied
> with then the processor will search for
>     messages[@locale=getlocale()]/p/f
> If this is not found then the last path element of p will be stripped
> off and it will try again, this allows "catch-all" error messages to
> be specified as above.
> Comments?
> Niall
> ____________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> or your free @yahoo.ie address at http://mail.yahoo.ie
Received on Wednesday, 4 July 2001 02:53:37 UTC

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