'Ensure that all fields\' values are valid and that required fields
are present.'

def validate(self, clean=True):

    errors = {}
    if clean:
        try:
            self.clean()
        except ValidationError as error:
            errors[NON_FIELD_ERRORS] = error
    fields = [(self._fields.get(name, self._dynamic_fields.get(name)), self._data.get(name)) for name in self._fields_ordered]
    EmbeddedDocumentField = _import_class('EmbeddedDocumentField')
    GenericEmbeddedDocumentField = _import_class('GenericEmbeddedDocumentField')
    for (field, value) in fields:
        if (value is not None):
            try:
                if isinstance(field, (EmbeddedDocumentField, GenericEmbeddedDocumentField)):
                    field._validate(value, clean=clean)
                else:
                    field._validate(value)
            except ValidationError as error:
                errors[field.name] = (error.errors or error)
            except (ValueError, AttributeError, AssertionError) as error:
                errors[field.name] = error
        elif (field.required and (not getattr(field, '_auto_gen', False))):
            errors[field.name] = ValidationError('Field    is    required', field_name=field.name)
    if errors:
        pk = 'None'
        if hasattr(self, 'pk'):
            pk = self.pk
        elif (self._instance and hasattr(self._instance, 'pk')):
            pk = self._instance.pk
        message = ('ValidationError    (%s:%s)    ' % (self._class_name, pk))
        raise ValidationError(message, errors=errors)
