commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eduardo Nogueira Fraguío <frag...@hotmail.com>
Subject validator, i18n and decimal point
Date Thu, 04 Mar 2004 11:06:49 GMT
 
    Hello to group.
 
    I´m trying use the framework validator with the purpose of validate a
float porperty, but i come across a problem with i18n, decimal point and
spanish language.
 
    Whereas for the english language the decimal point is the point
character ".", for the spanish language is the comma character "," and,
therefore, if a spanish user introduce, correctly, a float value like
'25,36' the validator framework don't validate it and throw the error
message.
 
    I'm using javascript client side validation.
 
    My validation.xml contains a formset for everyone language as follows:
 
******************************
<!-- default language -->
<formset>
    .... .... 
    <form name="producForm">
      <field property="price" depends="required,float">
            <arg0 key="key.validation.price" />
      </field>
    </form>
    .... ....
</formset>
 
<!-- spanish language -->
<formset language="es">
    .... ....
    <form name="producForm">
      <field property="price" depends="required,float">
            <arg0 key="key.validation.price" />
      </field>
    </form>
    .... ....
</formset>
 
*****************************
 
I'm barely aware the validator-rules.xml must contain a javascript function
declaration for everyone language that you validate, but i have been
studying the validator_1_0.dtd and i think it's no possible. 
 
Is this correct ??  Can anybody help me ????
 
Thank's in advance.
 
Eduardo.
A Coruña. Spain.
 
PS: Sorry for my english !!!
 
    

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message