commandlineparser / commandlineparser/commandline

Custom error message for missing sequence values

Offen
#363 1 Kommentar 7 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
C#
Sterne
4.8k
Forks
478
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.