Author: igorz
Date: 2007-11-01 04:37:50 -0500 (Thu, 01 Nov 2007)
New Revision: 88629
Modified:
trunk/mcs/class/System.Web/resources/ChangeLog
trunk/mcs/class/System.Web/resources/WebUIValidation_2.0.js
Log:
2007-11-01 Igor Zelmanovich <[EMAIL PROTECTED]>
* WebUIValidation_2.0.js: fixed ToInteger function.
value such '10.00' is not converted to integer.
Modified: trunk/mcs/class/System.Web/resources/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/resources/ChangeLog 2007-11-01 08:30:14 UTC
(rev 88628)
+++ trunk/mcs/class/System.Web/resources/ChangeLog 2007-11-01 09:37:50 UTC
(rev 88629)
@@ -1,3 +1,8 @@
+2007-11-01 Igor Zelmanovich <[EMAIL PROTECTED]>
+
+ * WebUIValidation_2.0.js: fixed ToInteger function.
+ value such '10.00' is not converted to integer.
+
2007-09-29 Marek Habersack <[EMAIL PROTECTED]>
* WebUIValidation_2.0.js: replace all the ocurrences of 'this' with
Modified: trunk/mcs/class/System.Web/resources/WebUIValidation_2.0.js
===================================================================
--- trunk/mcs/class/System.Web/resources/WebUIValidation_2.0.js 2007-11-01
08:30:14 UTC (rev 88628)
+++ trunk/mcs/class/System.Web/resources/WebUIValidation_2.0.js 2007-11-01
09:37:50 UTC (rev 88629)
@@ -280,10 +280,10 @@
webForm.ToInteger = function (s, validator)
{
- if ((v = parseInt(s, 10)) != s - 0)
+ if (s.match(/^\s*[-\+]?\d+\s*$/) == null)
return null;
- else
- return v;
+ var v = parseInt(s, 10);
+ return (isNaN(v) ? null : v);
}
webForm.ToString = function (s, validator)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches