def if_(condition_func, validation_func):
    """ Generates a validator to conditionally run a validation function

        Args:
            condition_func: a function that evaluates to a boolean
            validation_func: a validation function to apply
    """
    def wrapper(obj, prop):
        if not condition_func(obj):
            return (True, None)
        return validation_func(obj, prop)

    return wrapper