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

        import sys
        from pathvalidate import ValidationError, validate_filename

        try:
            validate_filename("fi:l*e/p\"a?t>h|.t<xt")
        except ValidationError as e:
            print(f"{e}\n", file=sys.stderr)

        try:
            validate_filename("COM1")
        except ValidationError as e:
            print(f"{e}\n", file=sys.stderr)

:Output:
    .. code-block:: none

        invalid char found: invalids=(':', '*', '/', '"', '?', '>', '|', '<'), value='fi:l*e/p"a?t>h|.t<xt', reason=INVALID_CHARACTER, target-platform=Windows

        'COM1' is a reserved name, reason=RESERVED_NAME, target-platform=universal
