Skip to main content

Table of Contents

Offline validation API


Only available versions of this content are shown in the dropdown

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 or a custom JavaScript function.

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


Runs a validate rule in offline mode with the specified name and class.


runValidate( validateName, className )


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.


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

In the following example, JavaScript code runs a pzValidateMeetingTime validate rule of the PEGA-MANAGEMENT-MEETING class.

if ( !pega.offline.runValidate( "pzValidateMeetingTime", 
        console.log("Meeting cannot be set up in the past"); 
Suggest Edit
Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us