Well something wonky is going on. >From my readthrough of the code, it *should* get called on empty formsets:
is_valid calls total_form_count to get a loop count total_form_count should be positive even if forms are blank is_valid then accesses form.errors inside that loop (django.forms.formsets.py 1.1.1 #237 if bool(self.errors[i])) accessing form.errors should run _get_errors() which calls full_clean() which calls clean() What about if you do formset3.is_valid() then formset3._errors this will access the current errors without triggering the full_clean If it is None - than validation is not triggering an access to the property function as it should -Preston On Dec 11, 7:36 am, Tom Evans <tevans...@googlemail.com> wrote: > On Tue, Dec 1, 2009 at 5:02 PM, Tom Evans <tevans...@googlemail.com> wrote: > > On Tue, Dec 1, 2009 at 4:14 PM, Tom Evans <tevans...@googlemail.com> wrote: > >> Hi all > > >> We encountered a strange issue today. When a user submits a formset > >> that is empty, we call is_valid() on the formset, expecting the > >> clean() method to be called. We then subsequently get errors later on, > >> because the formset did not call self.clean(), and therefore it did > >> not populate the fields we require on the formset. > >> .... > > > Raised ashttp://code.djangoproject.com/ticket/12295 > > > Cheers > > > Tom > > Can I get some feedback on this please? > > TIA > > Tom -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.