Skip to main content

Validating data in Dev Studio


3 Aufgaben

10 Min.

Visible to: All users
Anfänger Pega Platform 8.5 Data Integration Englisch
This content is now archived and is no longer updated. Progress is not calculated. Pega Cloud instances are disabled, and badges are no longer awarded. Hier klicken to continue your progress in the latest version.


GoGoRoad customers with Standard coverage provide credit card information during the Submission stage of an Assistance Request case to pay for services performed by the company. To reduce the chance of an error when processing the credit card information, stakeholders want to validate the credit card information provided by customers.

A senior developer created an edit validate rule named IsDigit to verify that a credit card number contains only numbers. Configure a validate rule for the Enter Payment Information step to validate entries in the Card number field by applying the IsDigit edit validate rule and entries in the Expiration date field by applying the EnterPaymentInformation validate rule.

The following table provides the credentials you need to complete the challenge.

Role User name Password
Application Developer author@gogoroad pega123!
Hinweis: Your practice environment may support the completion of multiple challenges. As a result, the configuration shown in the challenge walkthrough may not match your environment exactly.


Genaue Übungsschritte

1 Configure the validate rule

  1. From the navigation pane in Dev Studio, click App to open the App Explorer.
  2. In the App Explorer, right-click AssistanceRequest and click Create > Process > Validate to create a validate rule.
  3. In the Label field, enter Validate card information.
  4. Click Create and open to accept the remaining default settings and display the validate rule form.
  5. In the Property field, enter or select .PaymentInformation.CardNumber to apply the validation condition to the credit card number entered by the user.
  6. Under Conditions, click Add to display the Validation conditions window.
    Add condition to an edit validate rule
  7. In the Select a function field, enter or select Validation of [Property Name] using [Edit Validate Name] fails. The window updates to display two fields below the Select a function field.
  8. In the Validation of field, enter or select .PaymentInformation.CardNumber as the property to test.
  9. In the using field, enter or select IsDigit as the edit validate rule to test.
  10. In the Message field, enter Credit card number contains an invalid character.
    Validation condition to ensure the entered credit card number only contains digits
  11. Click Submit to complete the configuration of the validation condition.
  12. To the right of Additional Validation, enter or select EnterPaymentInformation to ensure the entered expiration date is before today.
    Validate card information validate rule configured
  13. Click Save to complete the configuration of the validate rule.

2 Apply the validate rule to the Enter Payment Information flow action

  1. In the App Explorer, expand AssistanceRequest > Process > Flow Action and click EnterPaymentInformation to open the Enter payment information flow action.
  2. On the flow action rule form, click the Validation tab to apply a validate rule when processing the flow action.
  3. In the Validate field, enter or select ValidateCardInformation to apply the validate rule you configured.
  4. Click Save to complete the configuration of the flow action.
    Validation criteria for EnterPaymentInformation flow action

3 Confirm your work

  1. In the header of Dev Studio, click Create > New > Assistance Request to create a new case.
  2. Advance the case to the Enter payment information step, entering information as required.
  3. In the Card number field, enter 1234567890ABCDEF.
  4. In the Expiration date field, enter a date that is in the past.
  5. Click Submit, and then confirm that validation of the fields fails and error messages are displayed on the Card number and Expiration date fields.
    Validation on the Enter payment information view
  6. In the Card number field, enter 1111222233334444.
  7. In the Expiration date field, enter a date that is in the future.
  8. Click Submit, and then confirm that the case advances to the next stage.

In den folgenden Missions verfügbar:

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

Pega Academy 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