Fixed #20403 -- Ignore forms marked for deletion when validating max_num.

This commit is contained in:
Ryan Kaskel 2013-05-20 12:13:03 -04:00 committed by Carl Meyer
parent 266c0bb23e
commit 4280217f31
3 changed files with 22 additions and 2 deletions

View file

@ -283,7 +283,8 @@ Validating the number of forms in a formset
If ``validate_max=True`` is passed to
:func:`~django.forms.formsets.formset_factory`, validation will also check
that the number of forms in the data set is less than or equal to ``max_num``.
that the number of forms in the data set, minus those marked for
deletion, is less than or equal to ``max_num``.
>>> from django.forms.formsets import formset_factory
>>> from myapp.forms import ArticleForm