adamabdelhamed / PowerArgs

The ultimate .NET Standard command line argument parser
MIT License
569 stars 56 forks source link

validation message missing for ArgCantBeCombinedWith #153

Open subzero01 opened 2 years ago

subzero01 commented 2 years ago

It should be usefull to provide a more human readably message to the user if the condition of ArgCantBeCombinedWith is false.

Example

public string Arg1; [ArgCantBeCombinedWith("!Arg1") public bool Arg2;

if the program is called with -arg2 it returns with the message

The argument 'Arg2' cannot be used with one or more arguments: !Arg1

It would be great to define a message like "Option -arg1 is required to use -arg2."

workabyte commented 2 years ago

@subzero01 I'm curious if you could expand on you use case/ desired result because I think you might benefit from a different arg validation because whati think you should be able to accomplish with ArgRequired(Arg2) or some conditional logic with one of the other validations

hope it helps