Offline validation API
The offline validation API consists of a JavaScript method that runs a validate rule in offline-enabled mobile apps by using a Run script action.
Offline validation is possible with the runValidate JavaScript method
that is available for the pega.offline
object. You can run the
following rules with this method:
- Validate rules that are referenced in flow actions
- Validate rules that you add to the list of offline-supported validate rules
Purpose
Runs a validate rule in offline mode with the specified name and class.
Signature
runValidate( validateName, className )
Returns
Returns a Boolean value that specifies whether the validation was successful (true) or not (false). The method also adds messages to properties for which the validation rule failed.
Parameters
Name | Description | Type | Required |
validateName | Specifies the name of the validate rule to run. | String | ✅ |
className | Specifies the name of the class that the validate rule belongs to. | String | ✅ |
Previous topic Validate rules in offline mode Next topic Function rules in offline mode