struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Van Wart <>
Subject Re: (Struts validation) Different message resource keys rather than placeholders
Date Wed, 26 Jul 2006 17:19:23 GMT
Givler, Eric wrote:
> But can't you just define a message specific to the field and validator for each definition
in the validations.xml file?
>       <field property="avg_meter_age" page="5" depends="required,integer,intRange">
>         <arg0 name="required" key="PF_Report_5.AvgMeterAge"/>
>         <msg name="integer" key="validation.error.PF_Report_5.AvgMeterAge.number"/>
>         <msg name="intRange" key="validation.error.PF_Report_5.AvgMeterAge.number"/>
>         <arg1 name="intRange" key="${var:min}" resource="false"/>
>         <arg2 name="intRange" key="${var:max}" resource="false"/>
>         <var><var-name>min</var-name><var-value>0</var-value></var>
>         <var><var-name>max</var-name><var-value>50</var-value></var>
>       </field>
Yes, yes I can... good old struts documentation. :)  I find a lot of the 
more complex questions aren't answered by the docs (or I'm not 
interpreting my problem correctly) and automatically go to the list for 
the more simpler stuff.

Thanks :)

- Scott

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message