<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def validate(self):
 """ Validates all field values for the model. """


        errors = {}

        for name, field in self.fields:
            try:
                field.validate(self._state.get(name))
            except Exception as e:
                errors[name] = e

        if len(errors) is not 0:
            raise Exception(errors)

        return True