def _get_validation_exclusions(self):
        exclude = []
        # Build up a list of fields that should be excluded from model field
        # validation and unique checks.
        for f in self.instance._fields.values():
            # Exclude fields that aren't on the form. The developer may be
            # adding these values to the model after form validation.
            if f.name not in self.fields:
                exclude.append(f.name)

            # Don't perform model validation on fields that were defined
            # manually on the form and excluded via the ModelForm's Meta
            # class. See #12901.
            elif self._meta.fields and f.name not in self._meta.fields:
                exclude.append(f.name)
            elif self._meta.exclude and f.name in self._meta.exclude:
                exclude.append(f.name)

            # Exclude fields that failed form validation. There's no need for
            # the model fields to validate them as well.
            elif f.name in list(self._errors.keys()):
                exclude.append(f.name)

            # Exclude empty fields that are not required by the form, if the
            # underlying model field is required. This keeps the model field
            # from raising a required error. Note: don't exclude the field from
            # validaton if the model field allows blanks. If it does, the blank
            # value may be included in a unique check, so cannot be excluded
            # from validation.
            else:
                field_value = self.cleaned_data.get(f.name, None)
                if not f.required and field_value in EMPTY_VALUES:
                    exclude.append(f.name)
        return exclude
For backwards-compatibility, several types of fields need to be
dataset/ETHPy150Open jschrewe/django-mongodbforms/mongodbforms/documents.py/BaseDocumentForm._get_validation_exclusions