Re: Managing Validation Error Messages

Tomayko, Ryan wrote:
> I want to chime in on this as well. This is one of the greater shortcomings
> of the spec IMO. It is a shame that validation rules to validation messages
> is a many to one relationship. It should be possible to provide a
> descriptive error message for each validation rule.
> 

Error messages per validation rule can be provided with the XML Schema
appinfo element, which resides in an annotation element. Appinfo is meant
for automatic processing.

In XForms error messages are bound to form controls because a form control
is the unit of presentation. The binding expression of a form control pertains
to only one node in the instance data. So how could something a user has
entered through one control cause multiple rules to be violated? Wouldn't
that indicate an error in the structure of the instance data? If so, it is a bug
in the form. The XForms alert elements are not indented to provide feedback
about bugs.

> I also feel that this might fall into a larger hole of data/presentation
> debate [1]. Should [in]validation messages really be part of the
> presentation layer? While the validation messages will at some point be
> presented to the user, the invalidation occurs at the data/logic level. It
> seems to make more sense to attach a meaningful description to the
> validation error when the node is found to be invalid. The control is not
> really what's invalid, the node the control is bound to is invalid. That
> statement can end up being a slippery slope however as you might apply the
> same idea to the hint and help common controls. 
> 
> - Ryan Tomayko
> 
> [1] See Post from Plechsmíd Martin [Martin.Plechsmid@merlin.cz] Re: XForms
> Schema Attached 7/25/2002
> 

My opinion about validation messages is described in
http://lists.w3.org/Archives/Public/www-forms/2002Jul/0037.html

I would like to add to this that the model of a form is part of the presentation
layer. The information it describes is presentation information. The part of
the presentation layer which resides on the server might have to do
transformations on a message before sending it to the business layer. In most
cases this is not needed of course and the merits for this are XForms'.

Werner.
-- 
Werner Donné  --  Re BVBA
Engelbeekstraat 8
B-3300 Tienen
tel: (+32) 486 425803	e-mail: werner.donne@re.be

Received on Friday, 2 August 2002 08:42:24 UTC