Skip to main content


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

Validating answers in a questionnaire

Updated on March 29, 2022

Display an error message in your questionnaire when an answer is invalid, to ensure that the information that users provide is accurate and in an expected format. For example, if a user types letters in a phone number, your application prompts the user to enter only numbers in that field.

  1. Navigate to the questionnaire:
    ChoicesActions
    Open the questionnaire in App Studio
    1. In the navigation pane of App Studio, click Case types.
    2. In the list of case types, open a case type of the Questionnaire type that you want to edit.
    Open the questionnaire in Dev Studio
    1. In the header of Dev Studio, click ConfigureCase ManagementQuestionnaire.
    2. Click the questionnaire that you want to edit.
  2. Click the question for which you want to configure a validation.
  3. In the Question settings pane, in the Validations section, click the Properties icon.
  4. In the Validate fields based on these conditions dialog box, in the Message field, enter an error message that users receive if the validation fails.
    For example: Enter Please correct your date of birth.
  5. Create a condition by providing a value to compare at run time, a comparator, and a value to compare against the first value.
    For example: To ensure that users enter a date of birth in the past, create a condition that checks the date. For example, BirthDate is before 1/22/2021.
  6. Optional: To add more rows to the condition, click Add a row.
  7. If you create multiple rows, define whether an answer needs to meet all or any conditions by selecting either and or or between the rows.
  8. Optional: To add more validations, click Add condition, and then repeat steps 4 through 7.
  9. Click OK.
  10. Click Save.
Result: If the validation fails at run time, users receive an error message. Users need to correct the answers with failed validation before submitting the questionnaire.

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