Goal: Check, if the user input is as expected.
The validation expression of the form layer favoriteNumber only allows integers as input. If the input proves to be invalid, the specified validationErrorMessage of the form layer will be displayed.
{
"type": "validateForm",
"params": {
"form": "favoriteNumber",
"onSuccess": "validInput",
"onError": "invalidInput"
}
}
The actions to be executed are specified in the actions parameter, in this case a validateForm action.