dthree/vorpal

Prompt validation does not visualize the output (errors)

Open

#69 ouverte le 23 déc. 2015

Voir sur GitHub
 (7 commentaires) (0 réactions) (0 assignés)JavaScript (313 forks)batch import
bughelp wanted

Métriques du dépôt

Stars
 (5 609 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

using inquirer a prompt with validate function should show the validate output, but with vorpal it is somehow omitted.

this.prompt([
    {
        type: 'input',
        name: 'test',
        message: 'Please type something different than `test` to see an error pop up... or type `test` to continue',
        validate: function (val) {
            if (val != 'test') {
                return "Please answer with the word test";
            }
            return true;
        }
    }
], function(answers) {
    console.log(answers);
});

in Inquirer you can see this work perfectly in the examples/input.js example. however the error gets lost somewhere in the process within vorpal I assume.

Guide contributeur