title: Django inline formset validation passes but no objects are saved
body: <p>I have this form:</p>
  
  <pre><code>class ServiceTargetForm(forms.ModelForm):
      class Meta:
          model = ServiceTarget
          fields=('target_type', 'target_value', 'target_threshold')
  </code></pre>
  
  <p>all the fields are required. </p>
  
  <p>To make everything more complicated this model has unique_together condition:</p>
  
  <pre><code>class ServiceTarget(models.Model):
      service = models.ForeignKey(Service, verbose_name = _(u"Service"))
      all the other fields
      ...
      class Meta:
          ordering = ['service__car__name', 'service__car__reg_no','service__name',]
          verbose_name = _(u"Service target")
          verbose_name_plural = _(u"Service targets")
          unique_together = ("service__id", "target_type")
  </code></pre>
  
  <p>so saving empty form like this:</p>
  
  <pre><code>ServiceTargetFormSet = inlineformset_factory(Service, ServiceTarget, extra = 1, form = ServiceTargetForm, formset = MyInlineFormSet)
  if request.method == 'POST':
      form = ServiceForm(request.POST, cars_queryset = cars_queryset, client = account)
  
      if form.is_valid():
          new_service = form.save(commit = False)
          stformset = ServiceTargetFormSet(request.POST, instance = new_service)
          if stformset.is_valid():
              form.save()
              stformset.save()
              messages.success(request, ugettext(u"New service was successfully created."))
              redirect_to = '/services/'
              return HttpResponseRedirect(request, redirect_to)
          else:
              messages.error(request, ugettext(u"Creating new service failed"))
  </code></pre>
  
  <p>Should defenately fail - yet does not. Queryset that gets posted is :</p>
  
  <pre><code>&lt;QueryDict: {u'servicetarget_set-0-target_value': [u''], u'servicetarget_set-INITIAL_FORMS': [u'0'], u'name': [u'asdasd2q31'], u'recipients': [u'4'], u'car': [u'22'], u'message_delivery_method': [u'email'], u'servicetarget_set-0-target_threshold': [u''], u'servicetarget_set-TOTAL_FORMS': [u'2'], u'more-rows-count': [u'0'], u'servicetarget_set-0-target_type': [u'km'], u'servicetarget_set-1-target_type': [u'km'], u'csrfmiddlewaretoken': [u'blablabla'], u'servicetarget_set-1-target_value': [u''], u'servicetarget_set-MAX_NUM_FORMS': [u''], u'message': [u'asdasdasd'], u'servicetarget_set-1-target_threshold': [u'']}&gt;
  </code></pre>
  
  <p>and it comes out clean, even though all the important fields are empty : [u'']. So one would think that if it validates - it also saves succesfully... But it does not. No records can be found in database. other than the records created by form - which validates and saves just fine. </p>
  
  <p>Update:
  found similar question which is also unanswered and it seems to be exactly the same problem:
  <a href="https://stackoverflow.com/questions/3901931/make-inlineformset-in-django-required">Make inlineformset in django required</a></p>
  
  <p>I created testscript for myself to use in shell and it brings up all the same results:</p>
  
  <pre><code>q = 'servicetarget_set-0-target_value=&amp;servicetarget_set-INITIAL_FORMS=0&amp;servicetarget_set-0-id=&amp;name=asdasdasd&amp;recipients=4&amp;car=13&amp;servicetarget_set-1-target_type=km&amp;servicetarget_set-1-service=&amp;servicetarget_set-0-target_threshold=&amp;servicetarget_set-TOTAL_FORMS=2&amp;servicetarget_set-0-service=&amp;servicetarget_set-1-target_threshold=&amp;more-rows-count=0&amp;servicetarget_set-0-target_type=km&amp;servicetarget_set-1-id=&amp;csrfmiddlewaretoken=90018471df61d327b6288cb38ad15630&amp;servicetarget_set-1-target_value=&amp;servicetarget_set-MAX_NUM_FORMS=&amp;message=asdasdasd&amp;message_delivery_method=email'
  
  from django.http import QueryDict
  qd = QueryDict(q)
  from account.models import Account
  account = Account.objects.get(id = 2)
  from services.models import Service, ServiceTarget
  from services.forms import ServiceTargetForm, MyInlineFormSet, ServiceForm
  from django.contrib.auth.models import User
  u = User.objects.get(id = 5)
  from guardian.shortcuts import get_objects_for_user
  cars_queryset = get_objects_for_user(u, 'cars.can_access_car').order_by('reg_no').filter(client = account)
  form = ServiceForm(qd, cars_queryset = cars_queryset, client = account)
  form.is_valid()
  True
  new_service = form.save(commit = False)
  from django.forms.models import inlineformset_factory
  ServiceTargetFormSet = inlineformset_factory(Service, ServiceTarget, fk_name="service", extra = 1, form = ServiceTargetForm, formset = MyInlineFormSet)
  stformset = ServiceTargetFormSet(qd, instance = new_service)
  stformset.is_valid()
  True
  stformset.cleaned_data
  [{}, {}]
  stformset.errors
  [{}, {}]
  stformset.non_form_errors()
  []
  </code></pre>
  
  <p>Update2:
  <a href="https://stackoverflow.com/questions/2406537/django-formsets-make-first-required">Django formsets: make first required?</a> accepted answere here says why the errors are not raised - apparently form has to have empty_permited set to False.</p>