| ! cue vet schema.cue data.yaml |
| Constraints specify what values are allowed. |
| To CUE they are just values like anything else, |
| but conceptually they can be explained as something in between types and |
| Constraints can be used to validate values of concrete instances. |
| They can be applied to CUE data, or directly to YAML or JSON. |
| But constraints can also reduce boilerplate. |
| If a constraints defines a concrete value, there is no need |
| to specify it in values to which this constraint applies. |
| name: =~"^\\p{Lu}" // Must start with an uppercase letter. |
| languages.2.tag: conflicting values string and false (mismatched types string and bool): |
| languages.1.name: invalid value "dutch" (does not match =~"^\\p{Lu}"): |