:Sample Code:
    .. code-block:: python

        import click

        from pathvalidate.click import validate_filename_arg, validate_filepath_arg


        @click.command()
        @click.option("--filename", callback=validate_filename_arg)
        @click.option("--filepath", callback=validate_filepath_arg)
        def cli(filename: str, filepath: str) -> None:
            if filename:
                click.echo(f"filename: {filename}")
            if filepath:
                click.echo(f"filepath: {filepath}")


        if __name__ == "__main__":
            cli()

:Output:
    .. code-block:: none

        $ ./examples/click_validate.py --filename ab
        filename: ab
        $ ./examples/click_validate.py --filepath e?g
        Usage: click_validate.py [OPTIONS]
        Try 'click_validate.py --help' for help.

        Error: Invalid value for '--filename': [PV1100] invalid characters found: invalids=('?'), value='e?g', platform=Windows
