Skip to main content

system.mes.dashboard.validateParameterType

Description

Validates the specified parameters for a Dashboard Widget Parameter Type and returns any validation errors. This does not save the object.

Syntax

system.mes.dashboard.validateParameterType(**parameter_type)

Parameters

ParameterTypeNullableDescription
nameStringFalseThe unique name of the parameter type.
viewPathStringFalsePerspective view path used to edit this parameter type.
idString (ULID)TrueThe ULID of the parameter type.
notesStringTrueNotes related to the parameter type.
enabledBooleanTrueIndicates if the parameter type is active and enabled.
spare1StringTrueAdditional field for user-defined context.
spare2StringTrueAdditional field for user-defined context.
spare3StringTrueAdditional field for user-defined context.

Returns

Returns a JSON object where keys are field names and values are lists of validation violation messages.

Code Examples

pt = system.mes.dashboard.newParameterType()
pt['name'] = '' # invalid
violations = system.mes.dashboard.validateParameterType(pt)
print(violations)