title: Why Custom Validator doesnt work in the document.ready of jQuery
body: <p>I call a function trought my Custom validator on .NET :</p>
  
  <pre><code>&lt;asp:CheckBox ID="chbNota" runat="server" /&gt;
  &lt;asp:CustomValidator ClientValidationFunction="RequiredPrivacy" Runat="server" ID="cvPrivacy" onservervalidate="CustomValidatorchkPrivacy_ServerValidate" &gt;&amp;nbsp;*&lt;/asp:CustomValidator&gt;
  </code></pre>
  
  <p>Now, If I declare the function into $(document).ready(function() as :</p>
  
  <pre><code>$(document).ready(function() {
      function RequiredPrivacy(oSrc, args) {
          if (!$('#&lt;%=chbNota.ClientID%&gt;').prop("checked")) args.IsValid = false;
      }
  });
  </code></pre>
  
  <p>the whole Validator on client side go to true.</p>
  
  <p>Why this behaviour? If I move that function out of $(document).ready(function() all work perfectly...</p>