Documentation for version v0.43.0 is no longer actively maintained. The version you are currently viewing is a static snapshot. For up-to-date documentation, 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)