A2uiBasicCatalogV1.CheckRule

class A2uiBasicCatalogV1.CheckRule


Holds the evaluated result of a client-side validation rule.

Check rules define client-side constraints evaluated against dynamic data or user input. Components receive evaluated rules in TypedContent to show validation feedback or guard actions.

Common Use Cases:

  • Input validation feedback: Input components (e.g., TextField, DateTimeInput, Slider, CheckBox, ChoicePicker) inspect condition. When false, the component enters an error state (such as an error outline or icon) and displays message in supporting or helper text.

  • Action gating and submit prevention: Action components (e.g., Button) inspect condition across form fields. When any rule fails, the button disables action dispatch or shows message explaining why the action cannot run.

  • Cross-component dependency validation: Check conditions observe shared data model paths to enforce relational constraints (e.g., verifying an end date succeeds a start date, or requiring a checkbox to be checked before submitting).

When all checks have condition equal to true (or the list is empty), the component is valid and renders normally. If dynamic check expressions are still resolving, the component waits in a loading state until all bound paths resolve.

Summary

Public constructors

CheckRule(condition: Boolean, message: String)

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

Boolean

true if the check passed; false if the validation rule failed

String

error message to display when condition is false

Public constructors

CheckRule

Added in 1.0.0-alpha01
CheckRule(condition: Boolean, message: String)

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

condition

Added in 1.0.0-alpha01
val conditionBoolean

true if the check passed; false if the validation rule failed

message

Added in 1.0.0-alpha01
val messageString

error message to display when condition is false