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

Re: Validation Error Messages

From: Niall Smart <regkey@yahoo.com>
Date: Tue, 3 Jul 2001 14:14:14 +0100 (BST)
Message-ID: <20010703131414.93611.qmail@web14002.mail.yahoo.com>
To: ryant@mad.scientist.com, www-forms@w3.org
--- 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:

    <date name="startDate" required="true" max="endDate">
    <date name="endDate" required="true" min="startDate">

then the error messages would be associated with the model using the
following syntax:

<messages locale="EN">
        <required>You must enter a start date.</required>
        <max>The start date must be before the end date.</max>
        <required>You must enter an end date.</required>
        <min>The end date must be after the start date.</max>

    <required>You have not entered a mandatory field.</required>

In the event of a facet f on model item with path p not being complied
with then the processor will search for


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.



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 Tuesday, 3 July 2001 09:14:15 UTC

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