to be more precise:

class AmountBaseFormset(formsets.BaseFormSet):

    def clean(self):
        (pseudo-code) if number of forms equal number of deleted
forms:
        raise forms.ValidationError(u'At least one Item is required.')

question is: how do I figure out the number of forms resp. the number
of delete forms here.
or is this approach the wrong way?

thanks,
patrick


On 15 Apr., 21:03, patrickk <sehmasch...@gmail.com> wrote:
> I´m allowing the forms within a formset to be deleted. but I need at
> least one form to save the formset. is it possible to require at least
> one form? if yes, how do I achieve this?
>
> thanks,
> patrick
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to