LinkedIn
Copied!

Table of Contents

Page-Validate method

Version:

Only available versions of this content are shown in the dropdown

Use the Page-Validate method to force validation (or revalidation) of the value of all properties on the step page. The system adds a message to each clipboard property that fails validation against the restrictions in its property.

If the page has hundreds or thousands of properties, this method can be expensive in terms of system resources. The properties on the page already set (through the Property-Set method or similar methods) may already be validated. This method validates them again, and also validates any property values not changed since the page was opened.

Unless the content of the page was altered by Java code or by unorthodox means, the Page-Validate method is not necessary.

Use the Obj-Validate method, not the Page-Validate method, to validate specific properties identified in a Rule-Obj-Validate rule.

A Page-Clear-Messages method applied later to the page removes the messages set by this method.

Parameters

This method has one parameter.

Parameter Description
WithErrors In most cases, leave cleared. If this check box is not selected and the page identified in the Step Page of this step already contains messages, this method ends. It does not validate properties or create messages.

Select this box to force this method to validate properties even if the page already contains messages.

Results

The system validates each property on the step page against the requirements imposed by that property's definition, such as:

  • Confirming that a definition for the property can be found (in a RuleSet and version available to this requestor), based on the property's name and the class of the page.
  • Confirming that the property value matches the Property Mode and, for Single Value properties, the Type restrictions appropriate for dates, times, numbers, and Boolean values.
  • Checking values against those provided (if any) by the Table fields on the General tab of the property.
  • If the property definition references a property qualifier, confirming that the qualifier value is present and meets its own constraints.
  • Comparing the length of values against the maximum defined in the definition.

This checking happens recursively for embedded pages. If any property fails validation, the system adds a message to the property and to the page.

A property with a null value is considered valid.

When a workstation user submits an HTML form to PRPC, previous page messages corresponding to the input are cleared.

Checking the results

When validation fails, a messages is added to the page. In a transition, use the when condition rule named @baseclass.HasMessages to test for the message. Validation failure does not modify the pxMethodStatus property value.

Restrictions

This method cannot be used in a step that involves an iteration.

Related Content

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.