The developer will know the validator type, because they just
specified it (either in a validate parameter, or with the @Validate
annotation).  They will not know, necesarilly, the message key used by
the validator implementation.

Further, different fields may have different messages for the same
validator, especially once we add back in a regexp-based validator. So
we need the flexibility to control, for a field-by-field basis, what
the message presented to the user will be.

On 2/5/07, Kent Tong <[EMAIL PROTECTED]> wrote:
Hi,

A validator uses its message key to lookup the error message. To
override it, we use the <field-id>-<validator-type> as the key
in the messages of the field's container. Why not standardize on
the message key:

  <field-id>-<message-key>

or on the validator type?

--
Kent Tong
Author of a book for learning Tapestry (http://www.agileskills2.org/EWDT)


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to