Skip to content

AddValidator methods should be fluent #1965

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

Closed
Tracked by #1891
adamsitnik opened this issue Nov 14, 2022 · 0 comments · Fixed by #1966
Closed
Tracked by #1891

AddValidator methods should be fluent #1965

adamsitnik opened this issue Nov 14, 2022 · 0 comments · Fixed by #1966
Assignees

Comments

@adamsitnik
Copy link
Member

While working on #1964 I've realized that we allow the users to add completions in fluent way, but at the same time we don't do it for the validators.

Proposed change:

- void AddValidator(Action<ArgumentResult> validate)
+ Argument<T> AddValidator(Action<ArgumentResult> validate)

- void AddValidator(Action<OptionResult> validate)
+ Option<T> AddValidator(Action<OptionResult> validate)

cc @jonsequitur @jozkee

@adamsitnik adamsitnik mentioned this issue Nov 14, 2022
56 tasks
@adamsitnik adamsitnik self-assigned this Nov 14, 2022
adamsitnik added a commit to adamsitnik/command-line-api that referenced this issue Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant