Skip to content

Add numeric and others validations for options #70

@kvivek1115

Description

@kvivek1115

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Triage: Feature RequestIndicates an issue requesting new functionality.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions