Skip to main content
Version: V2 (Ignition 8.1)

tamaki.mes.validations.clearValidationMessages

Description

Clears any validation text previously set on the Input children of parentElement. The function iterates children whose name contains Input and which are embedded views of TamakiMES/_components/Input (or TamakiMES/_components/MESDropdowns) and resets their validationText param to an empty string.

Syntax

tamaki.mes.validations.clearValidationMessages(parentElement)

Parameters

ParameterTypeNullableDescription
parentElementObjectFalseThe Perspective component containing the Input children. Children must be embedded views of TamakiMES/_components/Input.

Returns

This method does not return a value. It clears the validationText param on matching inputs as a side effect.

Code Examples

# Show validation failures, or clear them once validation passes before saving
container = self.parent.parent.getChild("MainContainer")
validations = dict(system.mes.dashboard.validateWidget(widget))
if validations:
tamaki.mes.validations.setValidationMessages(container, validations)
return
else:
tamaki.mes.validations.clearValidationMessages(container)
# ... proceed to save