Skip to main content

Reference

 

Applies only to Mobile Apps
OutSystems

Validation

Provides methods to show validation messages on widgets and set their validation values. Used when validating widgets inside iterators, since it's not possible to do it in the usual way.

Methods
isWidgetValid Checks if a given widget is currently valid.
setWidgetAsInvalid Sets a widget as invalid, with a given validation message.
setWidgetAsValid Sets a widget as valid.

Methods

isWidgetValid

isWidgetValid(widgetId: string): boolean

Checks if a given widget is currently valid.

Parameters

  • widgetIdstring

    The id of the widget to check for validity.

Returns

  • boolean

Returns true if the widget identified by widgetId is valid.

setWidgetAsInvalid

setWidgetAsInvalid(widgetId: string, validationMessage: string): void

Sets a widget as invalid, with a given validation message.

Parameters

  • widgetIdstring

    The id of the widget to mark as invalid.

  • validationMessagestring

    The validation message.

Returns

  • void

setWidgetAsValid

setWidgetAsValid(widgetId: string): void

Sets a widget as valid.

Parameters

  • widgetIdstring

    The id of the widget to set as valid.

Returns

  • void
  • Was this article helpful?