Skip to content

Latest commit

 

History

History
2 lines (2 loc) · 611 Bytes

README.md

File metadata and controls

2 lines (2 loc) · 611 Bytes

cli-validation

Library with additional validators for flag validation feature of urfave/cli (current for v3 only). Validation in urfave/cli is run only after the value has been converted from a string to the flag value type. So these validators need to focus only on validating the value, whether it be within a certain range or picked from a fixed number of values. Validation cannot be used to check slice/map length, because len can be known only after all the flags have been parsed. That kind of validation is a candidate for a Flag Action since those actions are run after all flags have been parsed