Closed dearchap closed 1 year ago
Aww, I liked the validation helper bits! 😭 WDYT about renaming
urfave/cli-altsrc
tourfave/cli-ext
and including them over there?
Hmm thats not a bad idea at all. I'm ok with that. cli-docs would go in there as well ? Would you like to take point on that ?
Aww, I liked the validation helper bits! 😭 WDYT about renaming
urfave/cli-altsrc
tourfave/cli-ext
and including them over there?
Hmm thats not a bad idea at all. I'm ok with that. cli-docs would go in there as well ? Would you like to take point on that ?
What type of PR is this?
(REQUIRED)
What this PR does / why we need it:
(REQUIRED)
This PR adds a framework for allowing users to be able to define custom validators on flags. Some very basic rudimentary ones have been provided for demonstration purposes to be able to gather user feedback on easy of use. Other validation functions may be provided in the future if users requests common ones. Note that the validation happens in the same context as when the value is set from the command line so slice flag validations for length may not work as expected.
Which issue(s) this PR fixes:
(REQUIRED)
Special notes for your reviewer:
(fill-in or delete this section)
Testing
(fill-in or delete this section)
Add new validation test cases,
Release Notes
(REQUIRED)