Verifying number of forms in inline formset

31 views
Skip to first unread message

Michael Stevens

unread,
Mar 5, 2012, 1:42:41 PM3/5/12
to django...@googlegroups.com
Hi.

I've got a django app using an inline formset.

It was all working nicely, but I want to add some validation such that the inline formset must contain at least one valid record. This seems to be surprisingly hard to do.

I've tried overriding clean() on the formset and looking at things like self.form, is_valid(), and so on, but I can't work out anything that will let me know the number of database records that will be present when the formset is saved.

Am I missing anything obvious? How could I do this?
Reply all
Reply to author
Forward
0 new messages