title: EnableValidator in JS
body: <p>I have a validator in my <code>Webform.aspx</code></p>
  
  <pre><code>&lt;asp:RequiredFieldValidator ID="val1" ClientIDMode="Static" runat="server"/&gt;
  </code></pre>
  
  <p>In my jquery, I have a function which attempts to disable it called by a button in the markup</p>
  
  <pre><code>btnclick = function()
  {
      var a = $('#val1');
      alert(a); //alerts [object Object]
      ValidatorEnable(a, false); //gets a console error
  }
  </code></pre>
  
  <p>when this function is executed, I get an error in the console (I am using Google Chrome), saying that <code>uncaught TypeError: Cannot set property 'visibility' of undefined</code></p>
  
  <p>Is this saying that my var a is undefined? ... but that makes no sense since it is alerting an <code>[object Object]</code></p>
  
  <p>I also did <code>alert(a.length</code>) which gave me <code>1</code> as expected. </p>