☁️ Loving our new documentation website? Provide feedback in the CloudCannon Community! ✨

required_message

Table of contents

Description:

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.

Appears in:
└── _inputs
    └── *
        ├── Text Input
        │   └── options
        │       └── required_message
        ├── Textarea Input
        │   └── options
        │       └── required_message
        ├── Code Input
        │   └── options
        │       └── required_message
        ├── Color Input
        │   └── options
        │       └── required_message
        ├── Number Input
        │   └── options
        │       └── required_message
        ├── Range Input
        │   └── options
        │       └── required_message
        ├── Rich Text Input
        │   └── options
        │       └── required_message
        ├── Date/Datetime Input
        │   └── options
        │       └── required_message
        ├── Time Input
        │   └── options
        │       └── required_message
        ├── File Input
        │   └── options
        │       └── required_message
        ├── URL Input
        │   └── options
        │       └── required_message
        ├── Select Input
        │   └── options
        │       └── required_message
        ├── Multiselect Input
        │   └── options
        │       └── required_message
        ├── Choice Input
        │   └── options
        │       └── required_message
        ├── Multichoice Input
        │   └── options
        │       └── required_message
        ├── Object Input
        │   └── options
        │       └── required_message
        └── Array Input
            └── options
                └── required_message
Type:
string
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."
      }
    }
  }
}
Open in a new tab