def require_params(self, req):
        """Require all defined parameters from request query string.

        Raises ``falcon.errors.HTTPMissingParam`` exception if any of required
        parameters is missing and ``falcon.errors.HTTPInvalidParam`` if any
        of parameters could not be understood (wrong format).

        Args:
            req (falcon.Request): request object

        """
        params = {}

        for name, param in self.params.items():
            if name not in req.params and param.required:
                # we could simply raise with this single param or use get_param
                # with required=True parameter but for client convenience
                # we prefer to list all missing params that are required
                missing = set(
                    p for p in self.params
                    if self.params[p].required
                ) - set(req.params.keys())

                raise errors.HTTPMissingParam(", ".join(missing))

            elif name in req.params or param.default:
                # Note: lack of key in req.params means it was not specified
                # so unless there is default value it will not be included in
                # output params dict.
                # This way we have explicit information that param was
                # not specified. Using None would not be as good because param
                # class can also return None from `.value()` method as a valid
                # translated value.
                try:
                    if param.many:
                        # params with "many" enabled need special care
                        values = req.get_param_as_list(
                            # note: falcon allows to pass value handler using
                            #       `transform` param so we do not need to
                            #       iterate through list manually
                            name, param.validated_value
                        ) or [
                            param.default and
                            param.validated_value(param.default)
                        ]
                        params[name] = param.container(values)
                    else:
                        # note that if many==False and query parameter
                        # occurs multiple times in qs then it is
                        # **unspecified** which one will be used. See:
                        # http://falcon.readthedocs.org/en/latest/api/request_and_response.html#falcon.Request.get_param  # noqa
                        params[name] = param.validated_value(
                            req.get_param(name, default=param.default)
                        )

                except ValidationError as err:
                    # ValidationError allows to easily translate itself to
                    # to falcon's HTTPInvalidParam (Bad Request HTTP response)
                    raise err.as_invalid_param(name)

                except ValueError as err:
                    # Other parsing issues are expected to raise ValueError
                    raise errors.HTTPInvalidParam(str(err), name)

        return params
Require all defined parameters from request query string.

        Raises ``falcon.errors.HTTPMissingParam`` exception if any of required
        parameters is missing and ``falcon.errors.HTTPInvalidParam`` if any
        of parameters could not be understood (wrong format).

        Args:
            req (falcon.Request): request object