Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no generic version of IsRequired #131

Closed
watsonsong opened this issue Aug 2, 2018 · 1 comment
Closed

There is no generic version of IsRequired #131

watsonsong opened this issue Aug 2, 2018 · 1 comment
Assignees
Labels
good first issue This seems like a good issue if you're a new contributor. help wanted We would be willing to take a well-written PR to help fix this.
Milestone

Comments

@watsonsong
Copy link

The IsRequired has no generic version so it can not link with other validation.
For example:
var optionConfig = app.Option<string>( "-c|--config <FILE>", "The config path.", CommandOptionType.SingleValue) .Accepts(v => v.ExistingFile()) .IsRequired();

This will make the type of 'optionConfig' from CommandOption to CommandOption.

@natemcmaster natemcmaster added help wanted We would be willing to take a well-written PR to help fix this. good first issue This seems like a good issue if you're a new contributor. labels Aug 2, 2018
@natemcmaster
Copy link
Owner

I'd be happy to take a PR for this one in 2.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue This seems like a good issue if you're a new contributor. help wanted We would be willing to take a well-written PR to help fix this.
Projects
None yet
Development

No branches or pull requests

2 participants