Hello,
I've placed two RadTextBoxes on a page together with a CompareValidator (Operator="Equal") with the option ValidateEmptyText="true". But the validator doesn't trigger when the value is empty. It doesn't work both client and server side.
The problem can be reproduces with the following code:
Regards,
Paul
I've placed two RadTextBoxes on a page together with a CompareValidator (Operator="Equal") with the option ValidateEmptyText="true". But the validator doesn't trigger when the value is empty. It doesn't work both client and server side.
The problem can be reproduces with the following code:
Value 1: <telerik:RadTextBox ID="txtPasswordFirst" runat="server" TextMode="Password"></telerik:RadTextBox> |
<br /> |
Value 2: <telerik:RadTextBox ID="txtPasswordSecond" runat="server" TextMode="Password"></telerik:RadTextBox> |
<asp:CompareValidator ID="valPasswordEqual" runat="server" EnableClientScript="false" ControlToValidate="txtPasswordSecond" ControlToCompare="txtPasswordFirst" Text="Values are not equal" Operator="Equal" ValidateEmptyText="True"></asp:CompareValidator> |
<br /> |
<asp:Button runat="server" Text="Submit" ID="btnSubmit" OnClick="btnSubmit_Click" /> |
<br /> |
<asp:Label runat="server" ID="lblRes" Text="Click to validate"></asp:Label> |
<script runat="server" > |
Protected Sub btnSubmit_Click(ByVal sender as Object, ByVal e as EventArgs) |
lblRes.Text = String.Format("IsValid: {0}", Page.IsValid) |
End Sub |
</script> |
Regards,
Paul