max_values
confusingly returns ErrorKind::UnknownArgument
when too many arguments are provided
#3760
Open
2 tasks done
Labels
A-parsing
Area: Parser's logic and needs it changed somehow.
C-enhancement
Category: Raise on the bar on expectations
S-waiting-on-design
Status: Waiting on user-facing design to be resolved before implementing
Please complete the following tasks
Clap Version
3.1.15
Describe your use case
I want to limit the maximum given arguments with a proper error message for the user when too many arguments are provided.
Describe the solution you'd like
Instead of
ErrorKind::UnknownArgument
I would likemax_values
to return a new error kind likeErrorKind::TooManyValues
mirroring the behavior ofmin_values
with its error kindErrorKind::TooFewValues
.Alternatives, if applicable
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: