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

custom command validation? #38

Closed
stephanos opened this issue Mar 13, 2015 · 4 comments
Closed

custom command validation? #38

stephanos opened this issue Mar 13, 2015 · 4 comments

Comments

@stephanos
Copy link

How can I use https://github.com/hapijs/joi to do the command validation instead of tv4? Something like a custom validation function on the command definition maybe?

@adrai
Copy link
Contributor

adrai commented Mar 13, 2015

Yes, there should be something...
call defineValidation and pass in a function that expects the cmd to be passed in...

@adrai
Copy link
Contributor

adrai commented Mar 13, 2015

And return a ValidationError

@stephanos
Copy link
Author

Thanks for the quick response! I just read the documentation and didn't see it there.

Works like a charm :)

@adrai
Copy link
Contributor

adrai commented Mar 13, 2015

Undocumented feature ;-)

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

2 participants