[Mono-bugs] [Bug 81280][Nor] New - RangeValidator should use inclusive range [w/ fix]
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Sat Mar 31 18:18:38 EDT 2007
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by mmorano at mikeandwan.us.
http://bugzilla.ximian.com/show_bug.cgi?id=81280
--- shadow/81280 2007-03-31 17:18:38.000000000 -0500
+++ shadow/81280.tmp.25339 2007-03-31 17:18:38.000000000 -0500
@@ -0,0 +1,45 @@
+Bug#: 81280
+Product: Mono: Class Libraries
+Version: 1.2
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Sys.Web
+AssignedTo: mhabersack at novell.com
+ReportedBy: mmorano at mikeandwan.us
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: RangeValidator should use inclusive range [w/ fix]
+
+When using a RangeValidator, you are to specify the min and max values for
+a rage. For example, you should be able to specify a range from 1 to 100,
+which would allow any value between 1 and 100 including the endpoints.
+However in mono's asp.net 2.0, this does not allow the endpoints.
+
+The error appears to be in the test within the WebValidation js file for
+2.0 applications. The patch listed below also seems to be how it is coded
+for the 1.x version of this js file, so not sure why this became different
+from the 1.x version.
+
+Here is the diff:
+
+Index: WebUIValidation_2.0.js
+===================================================================
+--- WebUIValidation_2.0.js (revision 75238)
++++ WebUIValidation_2.0.js (working copy)
+@@ -439,7 +439,7 @@
+ var MinimumValue = Convert (validator.getAttribute
+("minimumvalue"), DataType, validator);
+ var MaximumValue = Convert (validator.getAttribute
+("maximumvalue"), DataType, validator);
+ var val = Convert (ctrl_value, DataType, validator);
+- if (val == null || val <= MinimumValue || val >= MaximumValue) {
++ if (val == null || val < MinimumValue || val > MaximumValue) {
+ ValidatorFailed (validator);
+ return false;
+ }
More information about the mono-bugs
mailing list