Maybe you can add a property in your action which return the current
date. And reference this property in your validation configuration.

Or create a Static method in an Utility class, return return the
current date, And reference this property in your validation
configuration.

If both of these don't work, you have to implement your check by a
validate method in your action.


2010/11/19 Mead Lai <laiqi...@gmail.com>:
> Thank you, Dave.
> Your explain is helpful for me to understand it.
>
> I want to validate the birthday in struts2 validation.xml,
> The range of date is between 1900-01-01 and current Date.
> How to get current date time in the struts2 validation.xml,?
> Thanks!
>
> <field name="birth">
> <field-validator type="date">
> <param name="min">1900-01-01</param>
> <param name="max">${current Date}</param>
> <message>your birthday  shall be ${min}---${max}</message>
> </field-validator>
> </field>
>
> Regards,
> Mead
>
>
> On Thu, Nov 18, 2010 at 8:04 PM, Dave Newton <davelnew...@gmail.com> wrote:
>
>> Dave
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to