def all(*validators):
    def validate_all(fields):
        for validator in validators:
            errors = validator(fields)
            if errors:
                return errors

    validate_all.__doc__ = " and ".join(validator.__doc__ for validator in validators)
    return validate_all
Validation only succeeds if all passed in validators return no errors
dataset/ETHPy150Open timothycrosley/hug/hug/validate.py/all