Array format
Pass messages as an array of strings:
{
"type": "string",
"minLength": 5,
"x-messages": [
"5 chars please."
]
}
Options in schemas are always prefixed with x- (e.g. x-assertFormat) to not collide with future JSON schema spec keywords.
Type: string
Text content for "add property" buttons.
{
"type": "object",
"x-addPropertyContent": "Add field",
"additionalProperties": { "type": "string" }
}
booleantrueIf array "add" buttons should be displayed.
{
"type": "array",
"x-arrayAdd": false,
"items": { "type": "string" }
}
Type: string
Text content for array "add" buttons.
{
"type": "array",
"x-arrayAddContent": "Add item",
"items": { "type": "string" }
}
string'left''left', 'right'Controls the positioning of action buttons (delete, move, drag) in table format arrays. When set to 'right', buttons appear on the right side of the table. When set to 'left' (default), buttons appear on the left side.
{
"type": "array",
"x-format": "table",
"x-arrayButtonsPosition": "right",
"items": {
"type": "string"
}
}
booleantrueIf array "delete" buttons should be displayed.
{
"type": "array",
"x-arrayDelete": false,
"items": { "type": "string" }
}
booleanfalseAdds a "Delete all items" button to the array editor's header actions area.
{
"type": "array",
"x-arrayDeleteAll": true,
"items": { "type": "string" }
}
Type: string
Text content for the "delete all" button.
{
"type": "array",
"x-arrayDeleteAll": true,
"x-arrayDeleteAllContent": "Remove all",
"items": { "type": "string" }
}
Type: boolean
Per-schema override for showing a confirmation dialog before deleting array items. Overrides the global arrayDeleteConfirm option.
{
"type": "array",
"x-arrayDeleteConfirm": true,
"items": { "type": "string" }
}
Type: string
Text content for array "delete" buttons.
{
"type": "array",
"x-arrayDeleteContent": "Remove",
"items": { "type": "string" }
}
Type: string
Text content for array "drag" buttons.
{
"type": "array",
"x-sortable": true,
"x-arrayDragContent": "Drag to reorder",
"items": { "type": "string" }
}
booleanfalseAdds an "Add item" button in the footer of the array editor.
{
"type": "array",
"x-arrayFooterAdd": true,
"items": { "type": "string" }
}
Type: string
Text content for the footer "add" button.
{
"type": "array",
"x-arrayFooterAdd": true,
"x-arrayFooterAddContent": "Add item",
"items": { "type": "string" }
}
string'right''left', 'right'Controls the alignment of footer buttons. When 'right', buttons are pushed to the right side of the footer. When 'left', buttons align to the left.
{
"type": "array",
"x-arrayFooterAdd": true,
"x-arrayFooterButtonsPosition": "left",
"items": { "type": "string" }
}
booleanfalseAdds a "Delete all items" button in the footer of the array editor.
{
"type": "array",
"x-arrayFooterDeleteAll": true,
"items": { "type": "string" }
}
Type: string
Text content for the footer "delete all" button.
{
"type": "array",
"x-arrayFooterDeleteAll": true,
"x-arrayFooterDeleteAllContent": "Remove all",
"items": { "type": "string" }
}
booleantrueIf array "move up" and "move down" buttons should be displayed.
{
"type": "array",
"x-arrayMove": false,
"items": { "type": "string" }
}
Type: string
Text content for array "move down" buttons.
{
"type": "array",
"x-arrayMoveDownContent": "Move down",
"items": { "type": "string" }
}
Type: string
Text content for array "move up" buttons.
{
"type": "array",
"x-arrayMoveUpContent": "Move up",
"items": { "type": "string" }
}
booleanfalseTreats "format" as a validator rather than just an annotation.
{
"type": "string",
"format": "email",
"x-assertFormat": true
}
Type: array
Adds schema-defined action buttons to any editor, without them becoming part of the data model. Works on every editor type, including container editors (object/array). Each button config accepts:
label - The button's HTML content (sanitized before rendering, so it can carry an icon)event.name - Clicking the button emits jedison:<name> on the root Jedison instance, with a payload of { jedison, editor, path }attributes - An object of HTML attributes for the button element, filtered against an allowlist (id, class, title, name, value, disabled, aria-*, data-*, plus always-enabled/always-disabled to override the field's own disabled state)Subscribe to the event the same way as any other event:
jedison.on('jedison:detectCity', ({ jedison, editor, path }) => {})
{
"type": "string",
"title": "City",
"x-buttons": [
{
"label": "Detect city",
"event": { "name": "detectCity" },
"attributes": { "class": "my-custom-button" }
}
]
}
Type: string
Text content for "collapse" buttons.
{
"type": "object",
"x-enableCollapseToggle": true,
"x-collapseToggleContent": "Toggle",
"properties": {
"name": { "type": "string" }
}
}
Type: string[]
Controls the display order of tabs in categories-format object editors (categories-vertical, categories-horizontal). Categories listed in the array appear first in the specified order; any categories not listed follow in their natural order.
{
"type": "object",
"x-format": "categories-vertical",
"x-categoryOrder": ["contact", "profile"],
"properties": {
"profile": { "type": "object", "properties": { "name": { "type": "string" } } },
"contact": { "type": "object", "properties": { "email": { "type": "string" } } }
}
}
Type: object
Editors container HTML attributes can be set using this option. Attributes such as class or data-* will be applied to the container element.
{
"type": "object",
"x-containerAttributes": {
"class": "my-editor",
"data-id": "user-form"
}
}
Type: boolean
Whether the editor should deactivate (hide) or activate (show) non required properties. Works only with object type editors.
{
"type": "object",
"x-deactivateNonRequired": true,
"required": ["name"],
"properties": {
"name": { "type": "string" },
"nickname": { "type": "string" }
}
}
Type: string | object
When set on a oneOf or anyOf schema, determines the active sub-schema by validating the specified property against each schema option. Accepts either a property name string or an object with a propertyName key.
Falls back to the standard error-counting algorithm if no discriminator match is found.
{
"oneOf": [
{
"type": "object",
"properties": {
"type": { "type": "string", "const": "cat" },
"name": { "type": "string" }
}
},
{
"type": "object",
"properties": {
"type": { "type": "string", "const": "dog" },
"breed": { "type": "string" }
}
}
],
"x-discriminator": "type"
}
booleanfalseEnables inline JSON editing mode for this specific schema, allowing users to directly edit the JSON data within form fields.
{
"x-editJsonData": true,
"type": "object",
"title": "Edit JSON Data",
"description": "This object has 'x-editJsonData: true' which enables inline JSON editing.",
"properties": {
"name": {
"type": "string",
"title": "Name"
},
"description": {
"type": "string",
"title": "Description"
}
}
}
Type: boolean
Display a collapse button used to collapse or expand editors that support collapse like object and arrays.
{
"type": "object",
"x-enableCollapseToggle": true,
"properties": {
"name": { "type": "string" }
}
}
booleantrueValue will remain whatever is defined in schema "const".
{
"type": "string",
"const": "active",
"x-enforceConst": false
}
booleantrueWhether the editor initial value will be the first item in the "enum".
{
"type": "string",
"enum": ["draft", "published"],
"x-enforceEnum": false
}
Type: string[]
Used to display user-friendly labels in the editor instead of those listed in "enum".
{
"type": "string",
"enum": ["us", "gb", "de"],
"x-enumTitles": ["United States", "United Kingdom", "Germany"]
}
Type: object
Configuration object passed directly to the FilePond instance. Used with "x-format": "filepond".
{
"type": "string",
"x-format": "filepond",
"x-filepond": {
"acceptedFileTypes": ["image/*"]
}
}
Type: string
Determines which editor UI will be used to edit the json instance.
{
"type": "string",
"x-format": "textarea"
}
Type: object
A configuration object to determine the position of the property editor in the parent's grid.
Options:
columns: How many columns should the editor occupy. The number of columns can vary between css frameworks and their configuration.offset: How many columns should the editor be offsettednewRow: Whether the editor should be put in a new row{
"type": "object",
"x-format": "grid",
"properties": {
"firstName": {
"type": "string",
"x-grid": { "columns": 6 }
},
"lastName": {
"type": "string",
"x-grid": { "columns": 6 }
}
}
}
Type: boolean
Editors can be hidden using this option. When set to true, the editor is hidden.
{
"type": "object",
"properties": {
"internalId": {
"type": "string",
"x-hidden": true
},
"name": {
"type": "string"
}
}
}
Type: object
Used to display extra information.
Options:
variant: "modal"title: Plain text or markdowncontent: Plain text or markdown{
"type": "string",
"x-info": {
"variant": "modal",
"title": "Help",
"content": "Enter your full legal name."
}
}
Type: object
Used to set attributes for the editor input if it has one.
{
"type": "string",
"x-inputAttributes": {
"placeholder": "Enter your name",
"autocomplete": "name"
}
}
Type: object | string[]
Validation error messages can be customized using this option in the schema. The option can be used in different ways:
Pass messages as an array of strings:
{
"type": "string",
"minLength": 5,
"x-messages": [
"5 chars please."
]
}
Pass messages as an object with validation keywords as keys:
{
"type": "string",
"minLength": 5,
"const": "locoloco",
"x-messages": {
"minLength": "Need at least 5 sparks of brilliance.",
"const": "Only 'locoloco' unlocks the magic here."
}
}
Pass messages with language codes for internationalization support:
{
"type": "string",
"minLength": 5,
"const": "locoloco",
"x-messages": {
"en": {
"minLength": "Need at least 5 sparks of brilliance.",
"const": "Only 'locoloco' unlocks the magic here."
}
}
}
booleantruePer-schema override for showing or hiding the "Add property" button on object editors. Overrides the global objectAdd option.
{
"type": "object",
"x-objectAdd": false,
"additionalProperties": { "type": "string" }
}
booleantrueWhen enabled, displays a warning icon (⚠) in the legend of array and object editors when they contain nested validation errors. Set to false to disable.
Type: string
Custom tooltip message displayed on the legend warning icon. Requires x-navWarning to be active.
{
"type": "object",
"x-navWarning": true,
"x-navWarningMessage": "This section has validation errors",
"properties": {
"email": {
"type": "string",
"format": "email"
}
}
}
Type: string
Text content for "properties" buttons.
{
"type": "object",
"x-propertiesToggleContent": "Fields",
"properties": {
"name": { "type": "string" },
"nickname": { "type": "string" }
}
}
Type: string
Assigns a property to a named group in the properties activation dialog. Used together with enablePropertiesToggle and x-propGroupOrder.
{
"type": "object",
"properties": {
"firstName": {
"type": "string",
"x-propGroup": "identity"
},
"lastName": {
"type": "string",
"x-propGroup": "identity"
},
"email": {
"type": "string",
"x-propGroup": "contact"
}
}
}
Type: string[]
Defines the display order of property groups in the properties activation dialog. Groups are defined using x-propGroup on individual properties. Groups not included in the array are appended at the end; the default group (properties without x-propGroup) always appears first.
{
"type": "object",
"x-propGroupOrder": ["personal", "contact"],
"properties": {
"name": { "type": "string", "x-propGroup": "personal" },
"age": { "type": "number", "x-propGroup": "personal" },
"email": { "type": "string", "x-propGroup": "contact" }
}
}
string"change""never", "change", "input", "always"Determines when to display validation errors for this specific schema. Overrides the instance-level showErrors setting.
Note: The "input" option provides real-time validation as the user types, but only affects text-based inputs (string inputs, textareas, number inputs).
{
"type": "string",
"x-showErrors": "always"
}
booleanfalseItems can be sorted via drag and drop if Sortable.js is available.
{
"type": "array",
"x-sortable": true,
"items": {
"type": "string"
}
}
Type: boolean
Whether the editor should start expanded or collapsed. Works on editors that support collapse like object and arrays.
{
"type": "object",
"properties": {
"name": { "type": "string" },
"advanced": {
"type": "object",
"x-startCollapsed": true,
"properties": {
"timeout": { "type": "integer" }
}
}
}
}
Type: boolean
Per-schema override for including sub-error details in validation errors. Overrides the global subErrors option.
{
"type": "object",
"x-subErrors": false,
"properties": {
"email": { "type": "string", "format": "email" }
}
}
string'select''select', 'radios', 'radios-inline', 'modal', 'select-inline'Per-schema override for the input type used to switch between multiple editor schemas (anyOf, oneOf, type arrays). Overrides the global switcherInput option.
{
"x-switcherInput": "radios-inline",
"oneOf": [
{ "type": "string", "title": "Text" },
{ "type": "number", "title": "Number" }
]
}
string"title"The text displayed in the multiple editor switcher to select this sub-schema editor.
{
"oneOf": [
{
"type": "string",
"x-switcherTitle": "Text"
},
{
"type": "number",
"x-switcherTitle": "Number"
}
]
}
booleanfalseHides the editor title.
Type: string
Icon class to use in titles if using any.
{
"type": "object",
"properties": {
"email": {
"type": "string",
"format": "email",
"title": "Email address",
"x-titleIconClass": "bi bi-envelope"
},
"internalNote": {
"type": "string",
"title": "Internal note",
"x-titleHidden": true
}
}
}
Type: string
A template to form titles dynamically, using the same {{ placeholder }} syntax described on the Templates page. Currently only read by nav-format array editors, to title each item from its own value.
{
"type": "array",
"x-format": "nav-vertical",
"items": {
"type": "object",
"x-titleTemplate": "{{ value.name || 'New contact' }}",
"properties": {
"name": { "type": "string" }
}
}
}
Type: boolean
Per-schema override for applying native HTML constraint attributes based on JSON Schema keywords. Overrides the global useConstraintAttributes option.
min, maxmin, maxminlength, maxlength, patternminlength, maxlength{
"type": "string",
"minLength": 3,
"maxLength": 10,
"x-useConstraintAttributes": false
}