DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7318>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7318

javascript: zero - means bad integer??

           Summary: javascript: zero - means bad integer??
           Product: Commons
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Validator
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


there is a bug in javascript function validateInteger(form):
after parseInt there is condition:
if (!iValue || !(iValue >= -2147483648 && iValue <= 2147483647))
- in javascript when iValue is undefined or is zero, !iValue tells true.

should rather be:
if (isNaN(iValue) || !(iValue >= -2147483648 && iValue <= 2147483647))

i think the same is about validationg float, short etc.

salut.fish

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to