[Mono-bugs] [Bug 55867][Nor] New - Validator display not being honored

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 20 Mar 2004 20:44:46 -0500 (EST)


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@mikeandwan.us.

http://bugzilla.ximian.com/show_bug.cgi?id=55867

--- shadow/55867	2004-03-20 20:44:46.000000000 -0500
+++ shadow/55867.tmp.21615	2004-03-20 20:44:46.000000000 -0500
@@ -0,0 +1,97 @@
+Bug#: 55867
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: Gentoo
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Web
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: mmorano@mikeandwan.us               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Validator display not being honored
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+I have created a web form that makes use of Validators to check the
+different entry fields in the form, and a ValidationSummary control to
+display associated error messages.  If you set the Validators display
+property to "None" they should not render any content to the screen. 
+However, the Validators are writing their error message, (and the
+ValidationSummary control is properly displaying the error messages as well.)
+
+Steps to reproduce the problem:
+1. create an aspx page with the following code:
+
+
+<%@ Page Language="C#" %> 
+
+<script runat="server">
+public void DoIt(object sender, EventArgs e)
+{
+  this.Validate();
+
+  if(this.IsValid)
+  {
+	msg.Text = "VALIDATED";
+  }
+  else
+  {
+    msg.Text = "FAILED VALIDATION!";
+  }
+}
+</script>
+
+<html>
+<body>
+  <form runat="server">
+    <asp:ValidationSummary id="validationSummary"
+                           DisplayMode="BulletList"
+		           HeaderText="Correct the following:"
+                           runat="server" />
+
+    <asp:RequiredFieldValidator id="aValidator"
+                                ControlToValidate="a"
+                                Display="none"
+                                ErrorMessage="Enter value for 'a'"
+                                runat="server" />
+
+    <asp:TextBox id="a" runat="server" />
+    <asp:Button id="button" onClick="DoIt" runat="server" text="click me" />
+  </form>
+
+  <asp:Literal id="msg" runat="server" />
+
+</body>
+</html>
+
+
+2. browse to the page in your browser
+3. click the button without entering a value in the text box.
+
+
+Actual Results:
+The ValidationSummary control appropriately displays the list of error
+messsages (in this case, a list of one item).  Additionally, the Validator
+control prints out its Error message (which it should not because the
+display property for the RequredFieldValidator was set to "None".
+
+
+Expected Results:
+The ValidationSummary control would display as it did in the test, but the
+RequiredFieldValidator should not render any content to the page.
+
+
+How often does this happen? 
+always
+
+
+Additional Information:
+Running mono-0.31 and xsp-0.9