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

Is it possible to choose a default case for an input prompt? #194

Closed
mikeplis opened this issue Feb 7, 2020 · 1 comment
Closed

Is it possible to choose a default case for an input prompt? #194

mikeplis opened this issue Feb 7, 2020 · 1 comment
Labels

Comments

@mikeplis
Copy link

mikeplis commented Feb 7, 2020

When using the input prompt type, is it possible to set a default case that that input will be in? In my use case, I mostly want the input to be in PascalCase, but I can't guarantee the user will input a value in that case and I'd prefer not to have to have {{pascalCase componentName}} everywhere in my templates.

@crutchcorn
Copy link
Member

As Plop uses inquirer under the hood to generate the prompts, you should be able to enforce user input validation using the validate property

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants