dthree / vorpal

Node's framework for interactive CLIs
http://vorpal.js.org
MIT License
5.64k stars 280 forks source link

Async validation #101

Open scotthovestadt opened 8 years ago

scotthovestadt commented 8 years ago

Validation shouldn't need to throw an error. It doesn't fit with the way the rest of the code works. It should be allowed to return a promise or act on a callback like everything else does.

I need async validation.

@dthree Any concerns?

dthree commented 8 years ago

I recently updated it (like 2 days ago) so you can just return true, or false, or a message.

https://github.com/dthree/vorpal/wiki/api-|-vorpal.command#commandvalidatefunction

I agree with async as an option, sorry, I just hadn't gotten to it. :+1: on implementing.

JeffSpies commented 7 years ago

What's the status of this one? Still interested? I'd also like async validation.