custom validator is not working in asp.net
<pre><code>&lt;asp:TextBox ID="TextBox3" runat="server" Width="127px"&gt;&lt;/asp:TextBox&gt;
&lt;asp:CustomValidator ID="CustomValidator1" runat="server" 
                ControlToValidate="TextBox3" 
                ErrorMessage="Must Be 8 characters" 
                onservervalidate="CustomValidator1_ServerValidate"     
                ValidateEmptyText="True" 
                ValidationGroup="g1"&gt;*&lt;/asp:CustomValidator&gt;
  &lt;asp:Button ID="Button2" runat="server" onclick="Button2_Click" Text="LogIn" 
                ValidationGroup="g1" Width="83px" /&gt;


 protected void CustomValidator1_ServerValidate(object source, 
                      ServerValidateEventArgs args)
    {
        if (args.Value.Length == 8)
        {
            args.IsValid = true;
        }
        else
            args.IsValid = false;
    }
</code></pre>

<p>I want textbox to take 8 characters.But the event is not getting fired up.I haved tried by taking Required Field Validator as well as ValidateEmptyText to true but either of them is not working
Please Help.</p>
