commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r330124 - in /jakarta/commons/proper/validator/trunk: src/javascript/org/apache/commons/validator/javascript/ xdocs/
Date Tue, 01 Nov 2005 21:08:18 GMT
Author: niallp
Date: Tue Nov  1 13:08:03 2005
New Revision: 330124

URL: http://svn.apache.org/viewcvs?rev=330124&view=rev
Log:
Fix for Bug 37300 Int validation in Java and Javascript have different semantics - patch supplied
by Christopher Schultz, thanks!

Modified:
    jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateByte.js
    jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateIntRange.js
    jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateInteger.js
    jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateShort.js
    jakarta/commons/proper/validator/trunk/xdocs/changes.xml

Modified: jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateByte.js
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateByte.js?rev=330124&r1=330123&r2=330124&view=diff
==============================================================================
--- jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateByte.js
(original)
+++ jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateByte.js
Tue Nov  1 13:08:03 2005
@@ -45,7 +45,7 @@
 
                     } else {
 
-                        var iValue = parseInt(value);
+                        var iValue = parseInt(value, 10);
                         if (isNaN(iValue) || !(iValue >= -128 && iValue <=
127)) {
                             if (i == 0) {
                                 focusField = field;

Modified: jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateIntRange.js
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateIntRange.js?rev=330124&r1=330123&r2=330124&view=diff
==============================================================================
--- jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateIntRange.js
(original)
+++ jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateIntRange.js
Tue Nov  1 13:08:03 2005
@@ -31,7 +31,7 @@
                 if (value.length > 0) {
                     var iMin = parseInt(oRange[x][2]("min"));
                     var iMax = parseInt(oRange[x][2]("max"));
-                    var iValue = parseInt(value);
+                    var iValue = parseInt(value, 10);
                     if (!(iValue >= iMin && iValue <= iMax)) {
                         if (i == 0) {
                             focusField = field;

Modified: jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateInteger.js
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateInteger.js?rev=330124&r1=330123&r2=330124&view=diff
==============================================================================
--- jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateInteger.js
(original)
+++ jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateInteger.js
Tue Nov  1 13:08:03 2005
@@ -44,7 +44,7 @@
                         fields[i++] = oInteger[x][1];
 
                     } else {
-                        var iValue = parseInt(value);
+                        var iValue = parseInt(value, 10);
                         if (isNaN(iValue) || !(iValue >= -2147483648 && iValue
<= 2147483647)) {
                             if (i == 0) {
                                 focusField = field;

Modified: jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateShort.js
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateShort.js?rev=330124&r1=330123&r2=330124&view=diff
==============================================================================
--- jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateShort.js
(original)
+++ jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateShort.js
Tue Nov  1 13:08:03 2005
@@ -45,7 +45,7 @@
 
                     } else {
 
-                        var iValue = parseInt(value);
+                        var iValue = parseInt(value, 10);
                         if (isNaN(iValue) || !(iValue >= -32768 && iValue <=
32767)) {
                             if (i == 0) {
                                 focusField = field;

Modified: jakarta/commons/proper/validator/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/validator/trunk/xdocs/changes.xml?rev=330124&r1=330123&r2=330124&view=diff
==============================================================================
--- jakarta/commons/proper/validator/trunk/xdocs/changes.xml (original)
+++ jakarta/commons/proper/validator/trunk/xdocs/changes.xml Tue Nov  1 13:08:03 2005
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <!--
-   Copyright 2004 The Apache Software Foundation
+   Copyright 2004-2005 The Apache Software Foundation
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -171,6 +171,10 @@
       <action dev="niallp" type="add">
         Search the locale 'hierarchy' of formsets for a Form.
         <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=37310">PR# 37310</a>
+      </action>
+      <action dev="niallp" type="fix">
+         Int validation in Java and Javascript have different semantics.
+        <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=37300">PR# 37300</a>
       </action>
     </release>
   



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message