This documentation is for not yet released version of ytt. For the documentation of the latest release version, see the latest version.
Schema Validations Cheat Sheet
(For a more detailed guide, see Writing Schema Validations.)
| Use Case | Syntax |
|---|---|
Required stringusage: Using the empty/zero value | |
Required integerusage: Using the empty/zero value | |
Required arrayusage: Using the empty/zero value | |
Required mapusage: mark as “nullable” and “not_null” | |
Ensure string minimum lengthreference: | |
Ensure string exact length | |
Ensure a min value | |
Ensure a max value | |
Ensure a value between min and max | |
Enumerationusage: enumerations | |
Exactly one is specifiedusage: mutually exclusive config | |
Conditionally run validationsusage: conditional validations | |
Custom description of valid valueusage: writing custom rules | |
Disable validations flag | |
(Help improve our docs: edit this page on GitHub)
#carvel in Kubernetes Slack