Replies: 1 comment 1 reply
-
Original reply by @mpvl in cuelang/cue#659 (comment) See my answer in #657. In this particular case, pattern constraints cannot match against numbers and must match against fields. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Originally opened by @khepin in cuelang/cue#659
When researching an answer to cuelang/cue#657 (restrict string length), I had the following regex:
Which works, but only for length 8. So, loosely inspired by the documentation at https://cuelang.org/docs/tutorials/tour/references/emit/ and https://cuelang.org/docs/tutorials/tour/types/templates/ I thought I could apply that to regexes and attempted:
... that does NOT work ;-) is there a way to template regexes like this?
Beta Was this translation helpful? Give feedback.
All reactions