def make_chain(fns):
    """ Take a list of chainable validators and return a chained validator

    The functions should be decorated with ``chainable`` decorator.

    Any exceptions raised by any of the validators are propagated except for
    ``ReturnEarly`` exception which is trapped. When ``ReturnEarly`` exception
    is trapped, the original value passed to the chained validator is returned
    as is.
    """
    chain = lambda x: x
    for fn in reversed(fns):
        chain = fn(chain)

    def validator(v):
        try:
            return chain(v)
        except ReturnEarly:
            return v

    return validator
Take a list of chainable validators and return a chained validator

    The functions should be decorated with ``chainable`` decorator.

    Any exceptions raised by any of the validators are propagated except for
    ``ReturnEarly`` exception which is trapped. When ``ReturnEarly`` exception
    is trapped, the original value passed to the chained validator is returned
    as is.