- Description:
This key defines options that are specific to Time Inputs.
- Appears in:
└── _inputs └── * └── Time Input └── options- Type:
Object- Properties:
This key defines how an 'empty' value will be saved. Does not apply to existing empty values.
Defaults to:
nullAllowed values:
nullstringThis key toggles whether CloudCannon requires this Input to have a value.
Setting this key to
truewill require you to enter a value to save your changes, or discard your unsaved changes.By default, this key is
false(i.e., CloudCannon does not require this Input to have a value).This key is available for Array, Code, Color, Date and Time, File, Number, Object, Select and Multiselect, Text, Rich Text, and URL Inputs.
Defaults to:
falseShow examplesHide examples
In this example, we want to require our team to enter an
authorvalue for markup files with this Input.Copied to clipboard_inputs: author: type: text comment: Enter the name of the author for this blog post. options: required: true{ "_inputs": { "author": { "type": "text", "comment": "Enter the name of the author for this blog post.", "options": { "required": true } } } }This key defines a custom error message that explains why a value has failed the validation criteria from
options.required.This key requires you to define
options.required.This key has no default.
This key is available for Array, Code, Color, Date and Time, File, Number, Object, Select and Multiselect, Text, Rich Text, and URL Inputs.
Show examplesHide examples
In this example, we prompt our team to use enter an Input value using a required message.
Copied to clipboard_inputs: author: type: text comment: Enter the name of the author for this blog post. options: required: true required_message: You are not allowed to leave this blank.{ "_inputs": { "author": { "type": "text", "comment": "Enter the name of the author for this blog post.", "options": { "required": true, "required_message": "You are not allowed to leave this blank." } } } }- Examples: