(self, validators, resp_obj)
make validations
make validations
make validations
def validate(self, validators, resp_obj):
        """ make validations
        """
        self.validation_results = []
        if not validators:
            return

        logger.log_debug("start to validate.")

        validate_pass = True
        failures = []

        for validator in validators:
            # evaluate validators with context variable mapping.
            evaluated_validator = self.__eval_check_item(
                parser.parse_validator(validator),
                resp_obj
            )

            try:
                self._do_validation(evaluated_validator)
            except exceptions.ValidationFailure as ex:
                validate_pass = False
                failures.append(str(ex))

            self.validation_results.append(evaluated_validator)

        if not validate_pass:
            failures_string = "\n".join([failure for failure in failures])
            raise exceptions.ValidationFailure(failures_string)
def validate ( self , validators , resp_obj ) : self . validation_results = [ ] if not validators : return logger . log_debug ( "start to validate." ) validate_pass = True failures = [ ] for validator in validators : # evaluate validators with context variable mapping. evaluated_validator = self . __eval_check_item ( parser . parse_validator ( validator ) , resp_obj ) try : self . _do_validation ( evaluated_validator ) except exceptions . ValidationFailure as ex : validate_pass = False failures . append ( str ( ex ) ) self . validation_results . append ( evaluated_validator ) if not validate_pass : failures_string = "\n" . join ( [ failure for failure in failures ] ) raise exceptions . ValidationFailure ( failures_string )