if form.cleaned_data and not form.cleaned_data.get('DELETE'):
    total += form.cleaned_data['cost']
if self.instance.__total__ is not None and self.instance.__total__ != total:
    raise ValidationError('Oops!')


class ItemInline(admin.TabularInline):
    model = Item
formset = ItemInlineFormSet


class BuyerInline(admin.TabularInline):
    model = Buyer
formset = BuyerInlineFormSet
Validation of dependant inlines in django admin