Validation Error Messages

we discussed this at the recent FTF and plan to address it
at least in the UI layer.
Attaching such metadata to the model is also a good idea
(see other message on this thread)

>>>>> "Ryan" == Ryan Tomayko <rtomayko@columbus.rr.com> writes:

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

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

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

    Ryan> <xform...> <instance>
    Ryan> <po><info><date>10/10/2001</date></info></po>
    Ryan> </instance> <model> ...  <xsd:simpleType
    Ryan> name='date' ...  xf:message='%c must be a date
    Ryan> with format MM/DD/YYYY'/> ...  </model> </xform>

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

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

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

    Ryan> Thanks,

    Ryan> Ryan Tomayko <mailto:rtomayko@stercomm.com>
    Ryan> Sterling Commerce www.sterlingcommerce.com

-- 
Best Regards,
--raman
------------------------------------------------------------

IBM Research: Human Language Technologies
Phone:        1 (408) 927 2608
Fax:        1 (408) 927 3012
Email:        tvraman@us.ibm.com
WWW:      http://www.cs.cornell.edu/home/raman
PGP:          http://emacspeak.sf.net/raman.asc
Snail:        IBM Almaden Research Center,
              650 Harry Road
              San Jose 95120

Received on Tuesday, 3 July 2001 13:02:02 UTC