title: MVC hidden field being validated
body: <p>I have a few fields on my page that appear and dissappear depending on the dropdown selections you make on the page.</p>
  
  <p>So, for example, I have</p>
  
  <pre><code>&lt;section&gt;
              @Html.LabelFor(model =&gt; model.AuctionTypeId)
              &lt;div&gt; @Html.DropDownList("AuctionTypeId", Model.AuctionTypes, @AuctionControllerResource.SelectAuctionType, new { id="auctionType", required = "required" })
                  @Html.ValidationMessageFor(model =&gt; model.AuctionTypeId)       &lt;/div&gt;
          &lt;/section&gt;
          &lt;section&gt;
              @Html.LabelFor(model =&gt; model.AutomaticExtensionType, new { hidden = "true", id = "automaticExtensionTypeLabel" })
              &lt;div&gt; @Html.DropDownList("AutomaticExtensionType", Model.AutomaticExtensions, @AuctionControllerResource.SelectAutomaticExtensionType, new { hidden="hidden", required = "required", id = "automaticExtensionTypeList" }) 
                  @Html.ValidationMessageFor(model =&gt; model.AutomaticExtensionType)       &lt;/div&gt;
          &lt;/section&gt;
  </code></pre>
  
  <p>The JQuery code I have for this is</p>
  
  <pre><code>$('#auctionType').change(function () {
      var selectedAuctionType = $("#auctionType").val();
      var englishAuctionType = $("#englishAuctionTypeId").val();
      if (selectedAuctionType == englishAuctionType) {
          $("#automaticExtensionTypeList").show();
          $("#automaticExtensionTypeLabel").show();
      } else {
          $("#automaticExtensionTypeList").hide();
          $("#automaticExtensionTypeLabel").hide();
      }
  });
  </code></pre>
  
  <p>Now, the showing and hiding work like they should.  The problem is that when I submit the form and the field <code>automaticExtensionTypeList</code> is hidden, the form doesn't submit because <code>automaticExtensionTypeList</code> is a required field.  The question is how can I tell MVC to only validate visible fields?</p>
  
  <p>I've had a look through some of the JQuery we have written in this project and we have this line</p>
  
  <pre><code>$.validator.setDefaults({ ignore: [] });
  </code></pre>
  
  <p>Apparantly this enables hidden validation.  My question is, what line of code does the opposite?</p>