Skip to content

Should be able to define more than one validation rule, and rules should allow for an error message #86

@kael-shipman

Description

@kael-shipman

Should be able to do this:

$cmd->option('t')
    ->must(function($t) {
        return is_int($t);
    }, "Option `t` must be an integer")
    ->must(function($t) {
        return $t >= 0 && $t <= 10;
    }, "Option `t` must be between 0 and 10 inclusive.");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions