Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Validating case data

Updated on May 11, 2022

Help users enter data values in a valid format by preventing processing errors when the users create or save a case. To save time, add validation on a case-wide level instead of validating recurring fields on each individual assignment.

For example, in a Hire a candidate case type, you design a user view that includes a Hire date field. To ensure that users enter the date in a valid format, you add a validation rule for the Hire date field. However, if you need to configure the same Hire date field in multiple assignments throughout the case, you can add one validation rule for that field on a case-wide level that applies to all the Hire date fields in the case.
  1. In the navigation pane of App Studio, click Case types, and then click the case type that you want to open.
  2. On the Settings tab, click Validation.
  3. Click Configure in Dev Studio next to the action for which you want your application to validate user input.

    Validation upon case creation is possible only for cases without the Create stage. If your case type includes the Create stage, and you want to configure validation upon case creation, configure validation on the next stage after the Create stage.

    For more information, see The Create stage and Defining the entrance criteria for a stage.

  4. On the Create Validate form, in the Context section, in the Add to ruleset field, enter the name and version of an unlocked ruleset.
    The default values in the Label and Apply to fields must remain unchanged, so that the rule resolution can identify the appropriate rules.
  5. Click Create and open.
    Result: If you configure validation to occur when the user creates a case, the system considers the Edit Validate: OnAdd rule form. If you configure validation to occur when the user saves a case, the system considers the Edit Validate: Validate rule form. You complete the rule forms in the same way.
  6. On the Validate tab, in the Property field, press the Down arrow key, and then select the property that you want to validate.
  7. In the Conditions section, click Add to set a validation condition:
    1. In the Validation conditions dialog box, in the Select a function field, press the Down arrow key, and then select a function to validate your property.
    2. In the entry fields that display after you select a function, specify the parameters for your selection.
    3. Optional: To display a custom message when the input value fails validation, enter the text in the Message field.
    4. Optional: To enable execution of the conditions defined for the property, and the addition of multiple validation conditions, select the Enable conditions check box.
      If you clear the Enable conditions check box, you disable the execution of all of the conditions defined for the property, as well as the addition of multiple validation conditions.
    5. Optional: To create a condition with multiple validation parameters, click Add a row, repeat substeps 7.a through 7.b, and then add a logical operator to the condition.
    6. Optional: To require the user at run time to enter a non-blank value for the corresponding property, select the Required check box.
      If you select the Required check box and the user leaves the field blank at run time, the system displays the Value cannot be blank message.
    7. Optional: To have the system continue evaluating subsequent properties, even if the current evaluation fails, select the Continue validation check box.
      If you enable the check box for multiple properties, the user can view all potential validation errors on one page.
    8. Click Submit.
  8. Click Save.
For example: The following figure shows a validation rule that returns an error message when a user enters a hire date in the future and a run-time effect with the message visible when a user enters a hire date in the future:
Validation at design time and run time
Configuration and run-time effect of validation.

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

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

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us