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

Allow me to specify that a variable value must be present to proceed with install #3006

Open
JoeHCQ1 opened this issue Sep 17, 2024 · 0 comments
Labels
enhancement ✨ New feature or request

Comments

@JoeHCQ1
Copy link

JoeHCQ1 commented Sep 17, 2024

Is your feature request related to a problem? Please describe.

Right now, if I want to mandate a variable I must create a regex pattern that rejects the empty string. While this achieves the needed functionality, as a non-go programmer, this slows me down plenty. It'd be much simpler if I could just specify required: true or optional: false.

Similarly, someone might require a var to be either empty (in which case we use a default value) or that it match a regex. In this case too, it'd be simpler to specify required: true (default is false) than to craft a regex via ChatGPT which allows either blank or a valid input.

Here is the relevant section of the schema: https://github.com/zarf-dev/zarf/blob/main/zarf.schema.json#L122

I expect using the keyword required is better because the default behavior is required: false. I think it's more intuitive for optional fields to default false than true so the field should be named required not optional.

@JoeHCQ1 JoeHCQ1 added the enhancement ✨ New feature or request label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request
Projects
Status: Triage
Development

No branches or pull requests

1 participant