Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

is there a way to validate and reprompt on bad input? #3

mreinstein opened this Issue Oct 12, 2012 · 0 comments


None yet
1 participant

neat module @isaacs I'm wondering if there's a way to reprompt when a field fails validation? For instance example/npm-init/init-input.js reads version, but there's nothing preventing me from typing 'heh' at the prompt and having that accepted. I'd want to enforce semver for this field, and ditto for other field types. I looked at isaacs/npm/blob/master/lib/adduser.js to see how this was achieved, and notice it doesnt rely on promzard (uses your read package at a lower level.) Is this an intentional design decision, or what?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment