﻿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
29741	There is no way to validate a ModelAdmin against it's inline formsets	Kyle Agronick	nobody	"If you wanted to do some validation that included taking data from the ModelAdmin's form and it's formsets there is currently no way to do that. If you wanted to check that the user did not duplicate values in the form and the formset you must override the entire _changeform_view method. (Over 100 lines) The form and the formset's clean() methods get called separately with no context of the overall page.

There is the save_related(request, form, formsets, change) method where you can do this kind of validation. You can add errors at this point but they will never be checked.

There should be some kind of process_related() method where you have the request, the form, and all of it's formsets in one context.

The exact problem I'm having is I have users entering a hostname record in the ModelAdmin's form and CNAME records for that hostname on the inline forms. There is no way to check that the user didn't put the same data in the main form and the formsets."	Cleanup/optimization	closed	contrib.admin	2.1	Normal	invalid	validation forms admin		Unreviewed	0	0	0	0	0	0
