I realized that since this was a custom validator, I can add the error
message to the fieldErrors with whatever key i choose - so i can now
reference that error message.  What about for other validators, like the
expression validator, is there a way to specify a key for it?  I think the
expression validator by default adds to the actionErrors, is there another
way besides re-writing it and specifying to add to the fieldErrors instead?

On 11/20/07, Brian Relph <[EMAIL PROTECTED]> wrote:
>
>
> Can I reference action errors / messages in a similar way to field
> errors?  I have a custom validator for a date field that is split into
> month/day/year fields, but i want the errors for it to appear next to
> inputs.  Here are my validators:
>
> <field name="ssn">
>   <field-validator type="requiredstring">
>     <message key="validator.required" />
>   </field-validator>
>   <field-validator type="regex">
>     <param name="expression">^\d{4}$</param>
>     <message key="validator.format" />
>   </field-validator>
> </field>
>
> <validator type="splitdatevalidator">
>   <message key="validator.date.format" />
> </validator>
>
> which i reference in my jsp like so:
>
> <s:fielderror theme="healthe">
>   <s:param>ssn</s:param>
> </s:fielderror>
>
> how would i reference the "splitdatevalidator" in my jsp?
>

Reply via email to