code: def _validate(cls, method, resource=None):
      
      if method not in cls.__methods__:
          raise InvalidAPIUsage(403, FORBIDDEN_EXCEPTION_MESSAGE.format(
              method,
              cls.endpoint(), cls.__methods__))
  
      class_validator_name = 'validate_' + method
  
      if hasattr(cls, class_validator_name):
          class_validator = getattr(cls, class_validator_name)
          if not class_validator(resource):
              raise InvalidAPIUsage(403)
docs: Return ``True`` if the the given *cls* supports the HTTP *method* found
      on the incoming HTTP request.
  
      :param cls: class associated with the request's endpoint
      :type cls: :class:`sandman.model.Model` instance
      :param string method: HTTP method of incoming request
      :param resource: *cls* instance associated with the request
      :type resource: :class:`sandman.model.Model` or list of
                      :class:`sandman.model.Model` or None
      :rtype: bool