gui.callbacks.add_json_verification_cb
gui.callbacks.add_json_verification_cb(app, modules, macros)
Add a callback to the Dash app to verify JSON strings in input fields.
This function sets up a callback that checks whether the input values in specified input fields are valid JSON strings. It updates the class names of the input fields based on the validity of the JSON, which should result in a color change.
Parameters
Name | Type | Description | Default |
---|---|---|---|
app | Dash | The Dash application to which the callback will be added. | required |
modules | list[ModuleConnection] | A list of ModuleConnection objects representing the modules to be included in the application. | required |
macros | dict | None | A dictionary containing macro definitions to be used in the application. If None, no macros are used. | required |
Returns
Name | Type | Description |
---|---|---|
Dash | The Dash application with the added callback. |