-
Originally opened by @NReilingh in cuelang/cue#835 I'd like to vet a schema that requires one or more elements in a list. My schema is:
and I want to guarantee that I am very new to CUE, so I may not be defining these correctly in the first place. Is there a language feature that can help me do this cleanly, or is this the same problem described in cuelang/cue#401? I can accomplish this functionally with:
...but this does not result in a helpful error message. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Original reply by @myitcv in cuelang/cue#835 (comment) Thankfully the world has moved on since that question/question, and the new evaluator which will land in
If you
|
Beta Was this translation helpful? Give feedback.
-
Original reply by @eonpatapon in cuelang/cue#835 (comment) For minimum items in a list you can also express it like this:
Where |
Beta Was this translation helpful? Give feedback.
Original reply by @eonpatapon in cuelang/cue#835 (comment)
For minimum items in a list you can also express it like this:
Where
l
should be a list of at least 2 string values.