You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by fea jabi <zy...@hotmail.com> on 2006/10/13 23:59:12 UTC
date comparision using validwhen
can we use validwhen to do date comparision?
we are using date pattern MM-dd-yyyy. the data type in form bean property is
String.
Thanks.
_________________________________________________________________
Share your special moments by uploading 500 photos per month to Windows Live
Spaces
http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://www.get.live.com/spaces/features
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: date comparision using validwhen
Posted by Laurie Harper <la...@holoweb.net>.
fea jabi wrote:
> can we use validwhen to do date comparision?
>
> we are using date pattern MM-dd-yyyy. the data type in form bean
> property is String.
No, according to the last note in the validwhen section of the Validator
Guide [1],
* If both items to be compared are convertable to ints,
a numeric comparison is done, otherwise a string comparison
is done.
There's no support for date comparisons.
L.
[1] http://struts.apache.org/1.2.9/userGuide/dev_validator.html
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org