title: Page.IsValid always returning true with ValidationGroup and dynamic CustomValidator
body: <p>I am adding a custom validator to the page programmatically on click of a button, then validating the page and checking the IsValid property of the page. but the IsValid property is always returning true. Please help. here is the code. I need to add custom validator dynamically to show validation messages from business object. I am setting the IsValid property of the custom validator to false, so I expect the IsValid property of the Page to return false as well after validation. can't understand what I am doing wrong here.</p>
  
  <pre><code>    protected void Button1_Click(object sender, EventArgs e)
  {
      var validator = new CustomValidator();
      validator.IsValid = false;
      validator.ErrorMessage = "The input is invalid";
      validator.ValidationGroup = "vgCustom";
      Page.Validators.Add(validator);
      ValidationSummary1.ValidationGroup = "vgCustom";
      Page.Validate("vgCustom");
      Label1.Text = Page.IsValid ? "The Page is valid" : "The Page is Invalid";
  }
  </code></pre>
  
  <p>and here is the HTML mark-up</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml" &gt;
   &lt;head runat="server"&gt;
      &lt;title&gt;&lt;/title&gt;
   &lt;/head&gt;
   &lt;body&gt;
      &lt;form id="form1" runat="server"&gt;
      &lt;div&gt;
          &lt;asp:ValidationSummary ID="ValidationSummary1" runat="server"/&gt;
          &lt;asp:Button ID="Button1" runat="server" Text="Validate" OnClick="Button1_Click" /&gt;
          &lt;asp:Label ID="Label1" runat="server"&gt;&lt;/asp:Label&gt;
      &lt;/div&gt;
      &lt;/form&gt;
   &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>