﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
20333	Problems with BaseInlineFormSet.validate_max	Michael Angeletti	nobody	"I've noticed a couple problems with the validation of {{{BaseInlineFormSet.max_num}}} (when using the new {{{BaseInlineFormSet.validate_max}}} feature. The first one is way more important, but the second one is a nuisances as well. Both can be reproduced with a normal inline formset. I am using master @ {{{1267d2d9bc}}}.

**1) User can click back in their browser and exceed {{{max_num}}} after maxing out a formset and submitting the form.**

__Detail:__

If I click ""submit"" on a form that has a {{{max_num}}} of 1, then hit back and repopulate the same form again, clicking ""submit"" again, another record will be created, and this is boundless. I can take a formset with {{{max_num}}} set to 1 and create 500 records. I would venture to guess that you could even exceed the hard stop of 1000 by doing this.


**2) Attempting to delete existing records when {{{max_num}}} is already exceeded results in a validation error, even when not adding or editing records.**

__Detail:__

When {{{validate_max}}} is in effect, but {{{max_num}}} has already been exceeded (i.e., if I turn down {{{max_num}}} after users create objects) Django doesn't allow the user to even delete the existing records, meaning there is no way to remedy the situation. (see http://cl.ly/image/1k1Z1j2L2J3f - I merely checked the ""delete"" checkbox without adding any new ""uploads"" or editing the existing ones)"	New feature	closed	Forms	dev	Normal	wontfix	formsets,validation	Michael Angeletti	Unreviewed	0	0	0	0	0	0
