Hi,
I would need to enforce the max_num and min_num attributes of formsets on my admin pages at validation time.
From the documentation and the source, it seems that validate_max and validate_min would be the FormSet attributes that need to set to True for that to happen.
Yet, while investigating this issue, it seems to me that it is currently not possible to forward them to FromSet classes used in the Admin site:
1) From InlineModelAdmin.
get_formset() code, it is not useful to set validate_* on the inline itself, as it would not be forwarded to the inlineformset_factory() call on return.
2) From
formset_factory() code, it is not useful to set validate_* on the FormSet class itself, because it would be overwritten by the argument provided to the factory function.
Are you aware of a way to have the Admin instantiate FormSet classes with valide_min and validate_max set to true ?
If not, it seems to me it would be easy to allow it by extending the defaults dictionary in 1), so I am curious if there is a rationale for not allowing it, or if it is a simple oversight ?
Thank you very much for reading,
Ad