Support for adding a validator
on a #[derive(Args)]
struct
#3633
Labels
C-enhancement
Category: Raise on the bar on expectations
Please complete the following tasks
Clap Version
3.1.3
Describe your use case
Given something like this (toy example)
It might be nice to be able to achieve something similar to the Arg validator , but for the whole struct.
May be particularly useful if
NameSelector
grows more complex and/or reused in multiple CLI commands.Describe the solution you'd like
Alternatives, if applicable
Alternate interface could be a trait that you impl on
NameSelector
- but that doesn't seem in the spirit of the existingvalidator
implementation.Additional Context
No response
The text was updated successfully, but these errors were encountered: