struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Husted (JIRA)" <j...@apache.org>
Subject [jira] Updated: (WW-2405) Validation error , javascript error with number big
Date Sat, 12 Jan 2008 03:08:04 GMT

     [ https://issues.apache.org/struts/browse/WW-2405?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ted Husted updated WW-2405:
---------------------------

    Fix Version/s: Future

Of course, 2147483647 is Integer.MAX_VALUE


> Validation error , javascript error with number big
> ---------------------------------------------------
>
>                 Key: WW-2405
>                 URL: https://issues.apache.org/struts/browse/WW-2405
>             Project: Struts 2
>          Issue Type: Bug
>          Components: XML Validators
>    Affects Versions: 2.0.9, 2.0.11
>         Environment: Struts2, Jboss 4,05,  WIndows, Java 5
>            Reporter: RAUL
>             Fix For: Future
>
>
> <field name="nroExample">
>    <field-validator type="required">
> 	<message key="example.required"></message>
>  </field-validator>
>  <field-validator type="int">
>      <param name="min">0</param>
>      <param name="max">2147483647</param>
>                        <message key="common.error.field.value"></message>
>   </field-validator>
> </field>
> it generates javascript error. 
> the code source shows. 
> the error happens when the parameter max is big number as 2147483647
>   // field name: nroExample
>         // validator name: int
>         if (form.elements['nroExample']) {
>             field = form.elements['nroExample'];
>             var error = "Invalid field value for field";
>             if (field.value != null) {
>                 if (parseInt(field.value) <
>                      0 ||
>                         parseInt(field.value) >
>                            2.147.483.647) {
>                     addError(field, error);
>                     errors = true;
>                 }
>             }
>         }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message