Hi all,
In my valdiation.xml file, I have the following validation for a field that should be in this yyyy-MM-dd HH:mm:ss format.
<field property="myTimestamp" depends="required, date">
<arg0 key="myTimestamp" resource="false"/>
<arg1 key="yyyy-MM-dd HH:mm:ss" resource="false" />
<var>
<var-name>datePatternStrict</var-name>
<var-value>yyyy-MM-dd HH:mm:ss</var-value>
</var>
</field>
The straneg thing is when the value in the form field matches the specified format, it still gives the error "myTimestamp should be in yyyy-MM-dd HH:mm:ss" format.
When I change the form field value to just yyyy-MM-dd, strangely it passes the validation.
Any idea how to get yyyy-MM-dd HH:mm:ss validatin to work?
I use
Struts 1.1.
Thanks.
[ May 07, 2008: Message edited by: Wilson Gordon ]