Configuration options for the path value parser.
readonly
optional
type: "file"
| "directory"
| "either"
Expected type of path (file, directory, or either). Only checked when mustExist is true.
readonly
optional
allowCreate: boolean
Whether to allow creating new files/directories. When true and mustExist is false, validates that parent directory exists.
readonly
optional
extensions: readonly string[]
File extensions to accept (for files only). Each extension must
start with a dot (e.g. ".json", ".yaml").
readonly
optional
errors: { invalidExtension?: Message | (() => Message); pathNotFound?: Message | ((input: string) => Message); notAFile?: Message | ((input: string) => Message); notADirectory?: Message | ((input: string) => Message); parentNotFound?: Message | ((parentDir: string) => Message); }
Custom error messages for path validation failures.