Skip to main content

Common Properties

These are the common properties of a field (inside the meta field).

FieldData TypeDefault ValueDescription
namestringNoneUnique field name, this field is a required field for each type of input
classNamestringNonePass classname for custom styling or reference
displayNamestringNoneUsed to display the name of the field in the form
displayTypestringNoneDetermines the field type to be displayed. Supported options:
htmlPropsobjectNoneSets native HTML attributes for basic form controls like text_field, select, number, password, email, etc. Example attributes: step, min, max for number. You can use overrideDynamicSupport to override default behavior of dynamic options support
valuestring / boolean / number / arrayNoneThe value of the field
validationobjectNoneDefines field validation
readOnlyA readonly field is not editable and value cannot be changedboolean
dependenciesobjectNoneDefines relationships and dependencies between various fields

Field Properties - Validation Details

The validation settings within the Code component are crucial for ensuring that user input meets specific requirements. Here’s a breakdown of the available validation properties:

PropertyDescription
requiredBoolean value that specifies whether entering data into the field is mandatory.
infoDetailProvides additional information related to the field. Can be used to display messages like hints or guidelines to users.
requiredDetailContains the specific properties related to required validation, such as custom error messages.
minLengthSpecifies the minimum number of characters allowed in the input.
maxLengthSpecifies the maximum number of characters allowed in the input.
minSpecifies the minimum value allowed for number inputs, with support for dynamic values.
maxSpecifies the maximum value allowed for number inputs, also supporting dynamic conditions.
patternA regex pattern that the input must match to be considered valid.
validateA function for custom validation logic, which can return a boolean or an error message.

Example Usage of Validation Properties

required

This property is straightforward; if set to true, the field must be filled out. This is critical for ensuring data completeness.

"validation": {
"required": true
}

infoDetail

Use this to provide a message that can assist or guide the user in filling out the field correctly.

"validation": {
"infoDetail": {
"infoMsg": "Enter a valid code snippet following JavaScript ES6 standards."
}
}

requiredDetail

Allows for a custom error message that will be displayed when the required condition is not met. This helps in providing a more context-specific feedback to the user, enhancing user experience.

"validation": {
"required": true,
"requiredDetail": {
"errorMsg": "Integration name cannot be empty. Please provide a valid name."
}
}

Example of Validation

"validation": {
"required": true,
"pattern": "/^[a-zA-Z0-9]+/",
"min": 5,
"max": 10
}

Dependencies Properties

FieldData TypeDefault ValueDescription
conditionsarrayNoneDefines the conditions for the field to be displayed. Each condition is an object containing field, value, and operator
fieldstringNoneThe field on which the current field depends
valuestringNoneThe value of the field on which the current field depends
operatorstringNoneThe operator to be used for comparison (e.g., EQUALS, NOT_EQUALS, GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN_OR_EQUALS, CONTAINS, NOT_CONTAINS, END_WITH, START_WITH, EMPTY, NOT_EMPTY, REGEX, NOT_REGEX)

Example of Dependencies

"dependencies": {
"conditions": [
{
"field": "country",
"value": "USA",
"operator": "EQUALS"
},
{
"field": "age",
"value": "18",
"operator": "GREATER_THAN"
}
]
}