You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Angelo Luis <an...@gmail.com> on 2005/08/29 15:27:20 UTC

[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??

Re: [Validator] Decimal point and date

Posted by Aaron Sheffey <AS...@dtcc.com>.
Please reply with the JavaScript that is generated to validate on the 
client.




Angelo Luis <an...@gmail.com> 
08/29/2005 09:37 AM
Please respond to
"Jakarta Commons Users List" <co...@jakarta.apache.org>


To
Jakarta Commons Users List <co...@jakarta.apache.org>
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 <AS...@dtcc.com> 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 <an...@gmail.com>
> 08/29/2005 09:27 AM
> Please respond to
> "Jakarta Commons Users List" <co...@jakarta.apache.org>
> 
> 
> To
> commons-user@jakarta.apache.org
> 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??
> 
> 
>


Re: [Validator] Decimal point and date

Posted by Angelo Luis <an...@gmail.com>.
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 <AS...@dtcc.com> 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 <an...@gmail.com>
> 08/29/2005 09:27 AM
> Please respond to
> "Jakarta Commons Users List" <co...@jakarta.apache.org>
> 
> 
> To
> commons-user@jakarta.apache.org
> 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??
> 
> 
>

Re: [Validator] Decimal point and date

Posted by Aaron Sheffey <AS...@dtcc.com>.
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 <an...@gmail.com> 
08/29/2005 09:27 AM
Please respond to
"Jakarta Commons Users List" <co...@jakarta.apache.org>


To
commons-user@jakarta.apache.org
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??