On Wed, 26 Jan 2005 20:37:08 -0800 (PST), Norris Shelton <[EMAIL PROTECTED]> wrote: > I'm trying to ensure that the start date is less than the end > date. > > <field property="startDate" depends="validwhen"> > <arg0 key="startDate"/> > <var> > <var-name>test</var-name> > <var-value>((endDate > startDate) or (*this* > == null))</var-value>
ValidWhen does "int" or "String" comparisons only. If the two fields can be converted to int, then numeric comparison is done otherwise a String comparison is done (by invoking toString() if property is different from String). So, if your startDate and endDate are String of (MM/dd/yyyy) format then the comparison would be lexicographical and so you might not be seeing the desired output. Writing a custom validator or overriding the ActionForm might be the better alternatives > </var> > </field> > > I already have validations to ensure that they are valid dates > (before this). > > Nothing happens. Any suggestions? > > ===== > > Norris Shelton > Software Engineer > Sun Certified Java 1.1 Programmer > Appriss, Inc. > ICQ# 26487421 > AIM NorrisEShelton > YIM norrisshelton > > __________________________________ > Do you Yahoo!? > Yahoo! Mail - You care about security. So do we. > http://promotions.yahoo.com/new_mail > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]