I think I might have the issue. I just checked out validateDate.js on the comons cvs (http://cvs.apache.org/viewcvs.cgi/jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateDate.js?view=markup) and it appears that the pattern being used by the client is always assuming a four-digit year. On the server-side its more flexible, but on the client the JScript appears to be always assuming yyyy.
Hope that helps, Aaron Aaron Sheffey/DTCC 08/29/2005 10:02 AM To "Jakarta Commons Users List" <[email protected]> cc Subject Re: [Validator] Decimal point and date Please reply with the JavaScript that is generated to validate on the client. Angelo Luis <[EMAIL PROTECTED]> 08/29/2005 09:37 AM Please respond to "Jakarta Commons Users List" <[email protected]> To Jakarta Commons Users List <[email protected]> cc Subject Re: [Validator] Decimal point and date Yes, i am saying that (sorry if my english is confuse)... With this: <var-name>datePatternStrict</var-name> <var-value>dd/MM/yy</var-value> When i type 19/05/05 the java script validation say that is a wrong date, but if i turn off the java script the server side validation accept the date... On 8/29/05, Aaron Sheffey <[EMAIL PROTECTED]> wrote: > > I'm a little confused. Are you saying that with the second format, the > Validator client-side JavaScript validation fails and the server-side > validation works? > > > > > Angelo Luis <[EMAIL PROTECTED]> > 08/29/2005 09:27 AM > Please respond to > "Jakarta Commons Users List" <[email protected]> > > > To > [email protected] > cc > > Subject > [Validator] Decimal point and date > > > > > > > In my form this is work well: > > <field property="date" depends="required,date"> > <arg key="contrato.label.dtinicial" position="0"/> > <var> > <var-name>datePatternStrict</var-name> > <var-value>dd/MM/yyyy</var-value> > </var> > </field> > > but, when i change to this: > > > <field property="date" depends="required,date"> > <arg key="contrato.label.dtinicial" position="0"/> > <var> > <var-name>datePatternStrict</var-name> > <var-value>dd/MM/yy</var-value> > </var> > </field> > > The validation don't work anymore... I type 19/09/05 he give me a wrong > date... I turn off the JavaScript in my browser and the server-side > validation work well, only the JavaScript validation give the wrong date > anwser!!! > > The seond thing about validation is the decimal point separator!!! Both > server and client validation don't work with me!!! > That is what i do... > > In my jsp page: > <html:html locale=true> > In my struts-config.xml > <controller nocache="true" locale="true" /> > In my validations.xml > <formset country="BR" language="pt"> > > Am i forget something?? > > >
