import click


def validate_positive_int(ctx, param, value):
    """Callback to validate param passed is a positive integer."""
    if isinstance(value, int) and value > 0:
        return value
    raise click.BadParameter("Must be a positive integer")