code: def validate(self):
          
  
          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
docs: Validates all field values for the model.