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 multiselect validation #177

Closed
alexeagle opened this issue Jun 16, 2024 · 1 comment · Fixed by #179
Closed

Allow multiselect validation #177

alexeagle opened this issue Jun 16, 2024 · 1 comment · Fixed by #179

Comments

@alexeagle
Copy link

In my scaffold, it's a mistake to complete one of the MultiSelect fields in the form with zero selections.
I'd like to have a minimum of one.

https://pkg.go.dev/github.com/charmbracelet/huh#MultiSelect.Limit seems to support only an upper-bound, so I guess it has to use
https://github.com/charmbracelet/huh/blob/v0.4.2/field_multiselect.go#L55

I could make a proposal of how it would appear in the scaffold.yaml file if you like, but I'm sure you can imagine ways to express this.

@alexeagle
Copy link
Author

ah, sorry this was a dupe of #142

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

Successfully merging a pull request may close this issue.

1 participant