Michael Stevens
unread,Mar 5, 2012, 1:42:41 PM3/5/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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?