code: def is_valid(self):
          
          self.errors = []
  
          for field in self.get_all_field_names_declared_by_user():
              getattr(type(self), field).is_valid(self, type(self), field)
              field_errors = getattr(type(self), field).errors(self)
              self.errors.extend(field_errors)
  
          return len(self.errors) == 0
docs: Validates single instance. Returns boolean value and store errors in self.errors