import click


def validate_page_size(ctx, param, value):
    """Ensure that a valid value for page size is chosen."""
    # pylint: disable=unused-argument
    if value == 0:
        raise click.BadParameter("Page size must be non-zero or unset.", param=param)
    return value