title: CustomValidator client validation function not firing
body: <p>I thought that what I was trying to do was rather trivial, but it turns out to trouble me significantly. Here is the situation. </p>
  
  <p>I have two radio buttons (implemented using RadButton) and a RadTextBox. I want to check on the client, before submitting the form that the the RadTextBox is not empty when the one of the two radio buttons is selected (let's say the first one). I have used the CustomValidator and I have set ValidateEmptyText="True" to no luck. The extract of the code is below:</p>
  
  <pre><code>&lt;asp:Panel runat="server" ID="Panel1"&gt;
  &lt;table&gt;
      &lt;tr&gt;
          &lt;td class="auto-style5"&gt;
              &lt;telerik:RadButton ID="rdBtnIndividual" runat="server" AutoPostBack="False" GroupName="rdEmplrType" 
                  Text="Individual" ToggleType="Radio" OnClientCheckedChanged="rdBtnPhysical_CheckedChanged" 
                  UseSubmitBehavior="False"&gt;
                  &lt;ToggleStates&gt;
                      &lt;telerik:RadButtonToggleState PrimaryIconCssClass="rbToggleRadioChecked" /&gt;
                      &lt;telerik:RadButtonToggleState PrimaryIconCssClass="rbToggleRadio" /&gt;
                  &lt;/ToggleStates&gt;
              &lt;/telerik:RadButton&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;telerik:RadButton ID="rdBtnLegal" runat="server" AutoPostBack="False" GroupName="rdEmplrType" Text="Legal Entity" 
                  ToggleType="Radio" OnClientCheckedChanged="rdBtnLegal_CheckedChanged" UseSubmitBehavior="False"&gt;
                  &lt;ToggleStates&gt;
                      &lt;telerik:RadButtonToggleState PrimaryIconCssClass="rbToggleRadioChecked" /&gt;
                      &lt;telerik:RadButtonToggleState PrimaryIconCssClass="rbToggleRadio" /&gt;
                  &lt;/ToggleStates&gt;
              &lt;/telerik:RadButton&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td class="auto-style5"&gt;
              &lt;label&gt;Name:&lt;/label&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;telerik:RadTextBox ID="txtName" Runat="server" EmptyMessage="Name" LabelWidth="64px" Resize="None" Width="160px" DisabledStyle-BackColor="Silver"&gt;
              &lt;/telerik:RadTextBox&gt;
          &lt;/td&gt;
          &lt;td&gt;&lt;asp:RequiredFieldValidator ID="THIS_IS_WORKING" ControlToValidate="txtName"
                  runat="server" ErrorMessage="&lt;img src='images/Exclamation.png' Title='Required Field'/&gt;" &gt;
              &lt;/asp:RequiredFieldValidator&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td class="auto-style5"&gt;
              &lt;label&gt;Father's Name&lt;/label&gt;
          &lt;/td&gt;
          &lt;td style="width:100px"&gt;
              &lt;telerik:RadTextBox ID="txtFathersName" Runat="server" EmptyMessage="Father's Name" LabelWidth="64px" Resize="None" Width="160px" DisabledStyle-BackColor="Silver"&gt;
              &lt;/telerik:RadTextBox&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;asp:CustomValidator runat="server" ID="NOT_WORKING_VALIDATOR" ControlToValidate="txtFathersName" ValidateEmptyText="True"
                  ClientValidationFunction="RequiredIfIndividual"
                  ErrorMessage="&lt;img src='images/Exclamation.png' Title='Required Field'/&gt;" EnableClientScript="True"&gt;
              &lt;/asp:CustomValidator&gt;
  
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/asp:Panel&gt;
  </code></pre>
  
  <p>The javascript is below:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function RequiredIfIndividual(sender, args) {
          var chkBoxIndividual = $find("&lt;%=rdBtnIndividual.ClientID%&gt;");
          chkBoxIndividual = $telerik.toButton(chkBoxIndividual);
          if (chkBoxIndividual.get_checked()) {
              if (args.Value == "") {
                  args.IsValid = false;
              }
              else {
                  args.IsValid = true;
              }
          } else {
              args.IsValid = true;
          }
      }
  
  &lt;/script&gt;
  </code></pre>