commandlineparser / commandlineparser/commandline

Custom error message for missing sequence values

Aperta
#363 1 commento 7 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C#
Stelle
4.8k
Fork
478
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hello, thanks for this great library.

I have a question regarding sequence values. I've set a property for sequence of values like this:
```csharp
[Value(0, Min = 1, HelpText = "Path(s) to file(s)", Hidden = true)]
public IEnumerable FilePaths { get; }
```
So at least one value is required. When I parse an empty list of arguments the generated help message contains this:
```
ERROR(S):
A sequence value not bound to option name is defined with few items than required.
```
That message is not very informative to the user (it also contains a grammatical error if I'm not mistaken: `few` should be `fewer`?). How can I customize it? Thanks in advance.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.