Module validate

Module validate 

Source
Expand description

Lightweight validation helpers for common CLI patterns.

Functions§

parse_in_range
Parse a typed value from --key, ensuring it falls in an optional inclusive range.
path_exists
Validate that a path exists (file or dir).
path_is_dir
Validate that a path is a directory.
path_is_file
Validate that a path is a file.
require
Ensure a key is present: --key (flag) or --key <val> / --key=<val>.