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

Input validation for names #58

Open
kittauri opened this issue Jan 30, 2025 · 4 comments
Open

Input validation for names #58

kittauri opened this issue Jan 30, 2025 · 4 comments
Labels
04 type: enhancement making existing stuff better

Comments

@kittauri
Copy link

Check the input for permitted designations for the names. At the moment this is only checked at the end. This means that if someone does not know what is allowed to be entered, they go through all the settings, only to be told at the end that they can start from the beginning.

Not all people are aware of all the naming conventions. CLI should be more robust against user behavior.

@kittauri kittauri added the 04 type: enhancement making existing stuff better label Jan 30, 2025
@davisagli
Copy link
Member

This would be better UX, but as far as I am aware, cookiecutter (which we use for the prompts) doesn't provide a way to validate options one at a time while they are entered. @ericof Is that right?

@stevepiercy
Copy link
Contributor

Validation for each input is possible for only a few limited options, including booleans and option lists. See example below.

You've downloaded /Users/stevepiercy/.cookiecutters/cookieplone-templates before. Is it okay to delete and re-download it? [y/n] (y): x
Please enter Y or N

Input validation is one of the most wanted and longest requested features, going back to 2015. But it's a huge amount of work, some of which has been done in forks and is being slowly integrated. See:

@stevepiercy
Copy link
Contributor

Side note, I think that Cookiecutter maintainers should seek fiscal sponsorship from the Plone Foundation, the Python Software Foundation, or any other organization that is willing to provide the bank account to receive and disburse funds to support its development.

@ericof
Copy link
Member

ericof commented Jan 30, 2025

I'm in contact with Audrey about the future of cookiecutter. Let's see how it evolves

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
04 type: enhancement making existing stuff better
Projects
None yet
Development

No branches or pull requests

4 participants