Documentation for version v0.47.x 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 string ¶usage: Using the empty/zero value |
|
Required integer ¶usage: Using the empty/zero value |
|
Required array ¶usage: Using the empty/zero value |
|
Required map ¶usage: mark as “nullable” and “not_null” |
|
Ensure string minimum length ¶reference: |
|
Ensure string exact length ¶ |
|
Ensure a min value ¶ |
|
Ensure a max value ¶ |
|
Ensure a value between min and max ¶ |
|
Enumeration ¶usage: enumerations |
|
Exactly one is specified ¶usage: mutually exclusive config |
|
Conditionally run validations ¶usage: conditional validations |
|
Custom description of valid value ¶usage: writing custom rules |
|
Disable validations flag ¶ |
|
(Help improve our docs: edit this page on GitHub)