You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ferran Parra <fe...@mubimedia.com> on 2003/03/17 15:32:29 UTC
validation.xml and Timestamp
I'm using struts validator for all dates and it works fine for simple dates.
The entry in validation.xml file is like this.
<field property="eventDate"
depends="required,date">
<arg0 key="eventForm.eventDate.displayname"/>
<var>
<var-name>datePatternStrict</var-name>
<var-value>dd/MM/yyyy </var-value>
</var>
</field>
How can i validate datetime field using the same procedure using format
string "dd/MM/yyyy HH:SS" (timeStamp)?
-------------------------------------------------------
Ferran Parra
ferran_p@mubimedia.com
http://www.mubimedia.com
MUBIMEDIA S.L.
C/ Mallorca, 275, 1r 2a 08008 BCN
Tel: 93 215 21 91 / Fax: 93 215 41 21
-------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: validation.xml and Timestamp
Posted by Jeff Kyser <kt...@comcast.net>.
You could certainly use a depends='mask' and the appropriate regular
expression.
-jeff
On Monday, March 17, 2003, at 08:32 AM, Ferran Parra wrote:
>
> I'm using struts validator for all dates and it works fine for simple
> dates.
> The entry in validation.xml file is like this.
>
> <field property="eventDate"
> depends="required,date">
> <arg0 key="eventForm.eventDate.displayname"/>
> <var>
> <var-name>datePatternStrict</var-name>
> <var-value>dd/MM/yyyy </var-value>
> </var>
> </field>
>
> How can i validate datetime field using the same procedure using
> format
> string "dd/MM/yyyy HH:SS" (timeStamp)?
>
> -------------------------------------------------------
> Ferran Parra
> ferran_p@mubimedia.com
> http://www.mubimedia.com
> MUBIMEDIA S.L.
> C/ Mallorca, 275, 1r 2a 08008 BCN
> Tel: 93 215 21 91 / Fax: 93 215 41 21
> -------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org