hay-kot / scaffold

A cookie cutter alternative with in-project scaffolding for generating components, controllers, or other common code patterns.
https://hay-kot.github.io/scaffold/
MIT License
63 stars 8 forks source link

Allow multiselect validation #177

Closed alexeagle closed 4 months ago

alexeagle commented 5 months ago

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 commented 4 months ago

ah, sorry this was a dupe of #142