I have a custom validator that I want to use to check the length of a password (minimum of 4 caracters)
my html is
But my code behind validator is never called.
This is the code that sets up the call
Is there anything obviously wrong there?
(I intend adding in Client Side Validation as well, but want to get the server side working 1st)
my html is
Code:
<asp:CustomValidator id="cvPasswordLength"
runat="server" ErrorMessage="Password Must be at Least 4 Characters Long" ControlToValidate="tbPassword"
OnServerValidate="ServerValidatorPWLength">*</asp:CustomValidator>
But my code behind validator is never called.
This is the code that sets up the call
Code:
this.cvPasswordLength.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ServerValidatorPWLength);
Is there anything obviously wrong there?
(I intend adding in Client Side Validation as well, but want to get the server side working 1st)