title: Django formsets: make first required?
body: <p>These formsets are exhibiting exactly the <em>opposite</em> behavior that I want.</p>
  
  <p>My view is set up like this:</p>
  
  <pre><code>def post(request): # TODO: handle vehicle formset
      VehicleFormSetFactory = formset_factory(VehicleForm, extra=1)
      if request.POST:
          vehicles_formset = VehicleFormSetFactory(request.POST)
      else:
          vehicles_formset = VehicleFormSetFactory()
  </code></pre>
  
  <p>And my template looks like this:</p>
  
  <pre><code>    &lt;div id="vehicle_forms"&gt;
          {{ vehicles_formset.management_form }}
          {% for form in vehicles_formset.forms %}
              &lt;h4&gt;Vehicle {{forloop.counter}}&lt;/h4&gt;
              &lt;table&gt;
                  {% include "form.html" %}
              &lt;/table&gt;
          {% endfor %}
      &lt;/div&gt;
  </code></pre>
  
  <p>That way it initially generates only 1 form, like I want. But I want that one form to be required!</p>
  
  <p>When I dynamically add blank forms with JavaScript and <code>vehicles_formset.empty_form</code> all those extra forms are required, which I don't want.</p>
  
  <p>From the docs:</p>
  
  <blockquote>
    <p>The formset is smart enough to ignore extra forms that were not changed. </p>
  </blockquote>
  
  <p>This is the behavior the first form is exhibiting (not what I want) but not the behavior that the extra forms are exhibiting (what I do want).</p>
  
  <p>Is there some attribute I can can change to at least make <em>one</em> form required?</p>