title: How do I get KendoUI Validator to ignore hidden form elements?
body: <p>I am attempting to use KendoUI Validator with an ASP.NET WebForms project.
  I have a simple page, that has a number of inputs, and of course ASP.NET adds some hidden form elements as well.</p>
  
  <p>I have the following questions:</p>
  
  <ol>
  <li>Why does the KendoUI Validator not ignore hidden form fields, and how to I get it to?</li>
  <li>Why does KendoUI apply the rules to every input field, and how to do get it to ignore some fields.  I want a declarative way to do this, not by adding all sorts of exceptions in my validation rule, as per the example in the KendoUI Validator API page.</li>
  <li>Shouldn't it be that if no rule is set as an attribute in the input element (eg; required) then no validation is applied?</li>
  </ol>
  
  <p>Behavior I am getting:</p>
  
  <ul>
  <li>With no validation specific attributes on the input element at all, the validation rules still get applied when I call .validate()</li>
  <li>Hidden form elements are validated.</li>
  </ul>
  
  <p>I am using the following kendo:</p>
  
  <pre><code>http://cdn.kendostatic.com/2013.2.716/js/jquery.min.js
  http://cdn.kendostatic.com/2013.2.716/js/kendo.all.min.js
  http://cdn.kendostatic.com/2013.2.716/styles/kendo.common.min.css
  http://cdn.kendostatic.com/2013.2.716/styles/kendo.default.min.css
  </code></pre>
  
  <p>I have put together a fiddle that demonstrates this:
  <a href="http://jsfiddle.net/codeowl/B5ML4/3/" rel="nofollow">http://jsfiddle.net/codeowl/B5ML4/3/</a></p>
  
  <p>And here is the code, for those that don't have access to fiddle:</p>
  
  <p>I have the following markup:</p>
  
  <pre><code>&lt;form action="/" id="testForm"&gt;
      &lt;input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" /&gt;
      &lt;input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" /&gt;
  
      &lt;input type="text" id="testInput" value=""&gt;
      &lt;a id="testValidate" href="javascript:;"&gt;Validate&lt;/a&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>and the following script:</p>
  
  <pre><code>var validatable = $("#testForm").kendoValidator({
      rules: {
          testRule1: function (input) {
              // Only "Tom" will be a valid value for the FirstName input
              return input.is("[name=firstname]") &amp;&amp; input.val() === "Tom";
          },
          testRule2: function (input) {
              return $.trim(input.val()) !== "";
          }
      },
      messages: {
          testRule1: "Your name must be Test",
          testRule2: "Your name must be Foo"
      }
  }).data("kendoValidator");
  
  $("#testValidate").click(function () {
      if (validatable.validate()) {
          alert('passed');
      }
  });
  </code></pre>
  
  <p>and when I press the validate link it shows validation messages for the hidden fields.</p>