Toggle
The Toggle
component is a customizable switch control designed to be used in forms.
Examples
A simple toggle switch with basic configuration
Form Data:
{}
Field Properties
Properties used by this field (inside form
field in schema)
Name | Description | Type |
---|---|---|
name | The unique identifier for the switch control instance. | string |
displayName | A string that sets the display name of the switch control. | string |
description | A string providing additional information or instructions about the switch control. | string |
value | The initial value of the switch control. | boolean |
validation | An object for validation rules. | object |
required | A boolean indicating if the switch control is required (within validation). | boolean |
readOnly | A readonly field is not editable and value cannot be changed | boolean |
disabled | A boolean indicating if the switch control is disabled (within validation). | boolean |
Field Properties - Validation Details
The validation settings within the Textarea component are crucial for ensuring that user input meets specific requirements. Here’s a breakdown of the available validation properties:
Property | Description |
---|---|
required | Boolean value that specifies whether entering data into the field is mandatory. |
validate | A function for custom validation logic, which can return a boolean or an error message. |
requiredDetail | Contains info msgs about the required validation property |