Bug 313011 (MONO49927)

Summary: RangeValidator results in exception
Product: [Mono] Mono: Class Libraries Reporter: Yaron Shkop <yaronsh>
Component: Sys.WebAssignee: Gonzalo Paniagua Javier <gonzalo>
Status: RESOLVED FIXED QA Contact: Mono Bugs <mono-bugs>
Severity: Major    
Priority: P3 - Medium Keywords: UI
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: All   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Testcase

Description Thomas Wiest 2007-09-15 18:17:55 UTC


---- Reported by yaronsh@mainsoft.com 2003-10-21 09:09:20 MST ----

Please fill in this template when reporting a bug, unless you know what 
you are doing.
Description of Problem:
Using range validator on Date validating results an exception 

Steps to reproduce the problem:
1. Open the attached aspx

Actual Results:
Exception.

This is the highlight of the exception:
System.Web.HttpException: Validator_value_bad_type: 2001/1/1 MaximumValue 
rangeValDate Date 
in <0x00156> 
System.Web.UI.WebControls.RangeValidator:ControlPropertiesValid ()
in <0x00021> System.Web.UI.WebControls.BaseValidator:get_PropertiesValid ()
in <0x0009a> System.Web.UI.WebControls.BaseValidator:Render 
(System.Web.UI.HtmlTextWriter)
in <0x0001c> System.Web.UI.Control:RenderControl 
(System.Web.UI.HtmlTextWriter)


Expected Results:
A page with textbox for date range validation 

How often does this happen? 
Always



---- Additional Comments From yaronsh@mainsoft.com 2003-10-21 09:10:40 MST ----

Created an attachment (id=165088)
Testcase




---- Additional Comments From yaronsh@mainsoft.com 2003-10-21 09:25:16 MST ----

I think the problem is at BaseCompareValidator.Convert()



---- Additional Comments From yaronsh@mainsoft.com 2003-10-22 10:39:27 MST ----

Is the bug in corlib?? I don't think so... I work with different 
corlib and the problem is the same... I don't think this praticular 
problem is in corlib...



---- Additional Comments From gonzalo@ximian.com 2003-10-22 11:43:01 MST ----

Now we get a little further. The page is rendered.




---- Additional Comments From gonzalo@ximian.com 2003-10-23 08:49:30 MST ----

Fixed in CVS.



---- Additional Comments From yaronsh@mainsoft.com 2003-10-23 09:12:13 MST ----

Was it in System.Web?



---- Additional Comments From gonzalo@ximian.com 2003-10-23 09:45:37 MST ----

The last part, yes. There was a bug in DateTime.cs too (fixed by Dick)
too.

I only changed && by || in the first Match to make this work.



---- Additional Comments From yaronsh@mainsoft.com 2003-10-23 10:02:29 MST ----

On what method? On Convert?



---- Additional Comments From gonzalo@ximian.com 2003-10-23 10:13:41 MST ----

YEs. It's now splitted in ConvertDate. The if (match.Success && order
== "ymd" is not an ||.



---- Additional Comments From yaronsh@mainsoft.com 2003-10-23 10:19:08 MST ----

At both old and new versions the condition is 
if(matchDate.Success && order == "ymd")

Are you sure it's in the cvs?

Imported an attachment (id=165088)