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

Add numeric and others validations for options #70

Open
kvivek1115 opened this issue Jul 2, 2019 · 0 comments
Open

Add numeric and others validations for options #70

kvivek1115 opened this issue Jul 2, 2019 · 0 comments
Labels
Triage: Feature Request Indicates an issue requesting new functionality.

Comments

@kvivek1115
Copy link

Describe the Enhancement:

At present, there is no way to add validation criteria while defining the options params for example if the option only accepts integer we need to validate by providing some option params.

It will also cover #38

Describe the Need:

In chef/chef#8489 we realized we need to pass an integer to Train, but we realized we should probably ensure the users are giving us an integer when we require that.

I don't see an existing pattern in Chef right now. Maybe it's a simple single line or maybe it's a pattern we make a mixin. Let's add validation to each of the command line options that should be numeric though.

For example, --connection-port, --winrm-session-timeout, --max-wait.

Maybe a mixlib-cli option that would let you specify that it should be numeric, and maybe the acceptable range? I kind of thought we already had something like that.

@kvivek1115 kvivek1115 added the Status: Untriaged An issue that has yet to be triaged. label Jul 2, 2019
@tas50 tas50 added Triage: Feature Request Indicates an issue requesting new functionality. and removed Status: Untriaged An issue that has yet to be triaged. labels Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triage: Feature Request Indicates an issue requesting new functionality.
Projects
None yet
Development

No branches or pull requests

2 participants