`BaseFormSet.is_valid` should call it's underlying forms' `is_valid`
|Reported by:||Simon Charette||Owned by:||nobody|
|Severity:||Normal||Keywords:||form formset is_valid|
|Cc:||foonicorn||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The actual implementation of
BaseFormSet.is_valid checks if any of it's underlying forms have errors which short circuits any extra check-ups that could be defined in the form
class MyForm(Form): def is_valid(self): is_valid = super(MyForm, self).is_valid() print 'I was called' return is_valid and self.other_non_field_related_validation() MyFormSet = formset_factory(MyForm) # In this case calling MyFormSet(data).is_valid() will never print 'I was called'.
I'm submitting this as a bug since I don't think that's the expected behaviour.
Change History (9)
comment:1 Changed 4 years ago by
|Patch needs improvement:||unset|