struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Relph" <relp...@gmail.com>
Subject validation errors
Date Tue, 20 Nov 2007 16:49:46 GMT
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?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message