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

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

Open
kael-shipman opened this issue Mar 12, 2018 · 1 comment

Comments

@kael-shipman
Copy link

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.");
@kael-shipman
Copy link
Author

Again, will PR if spec approved.

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

No branches or pull requests

1 participant