top of page

Validation rule in constellation UI form

In this blog, let's learn how to develop a validation rule in Pega Constellation Application. For this, let's make use of the Customer KYC case or Customer Registration for the Retail Bank application. During customer registration, we want to input the Date of Birth in the UI form. The validation we want to put around this field is that the DOB cannot be the current or a future date.


Assume we have a case type called Customer Registration. This is what the case type looks like.


ree

In the Personal Info step, I have a field called DOB. For this field, I want to develop a new validation. Click on the step (Process Name) - Personal Info, and then click the Configure View button.

ree

Click on Conditions tab to configure a new Validate rule for the selected Step - Personal Info

ree

Give the message you want to display when validation has failed. For example, in our case, we want to show the error message as - Date of birth cannot be the current or a future date. Enter this message into the message field.


Next, you need to select the field for which this validation will be performed. In our case, it is DOB. The DOB field is defined in the Customer Data field, which is defined in the Case type, so we need to first select the Customer Data field of the case, then select the DOB field of the Customer Data field. Seems confusing :) Not really, just follow the steps as shown below.


ree
ree
ree

Select the DOB field, then it will show a validation rule like below. Add a validation that says DOB should not be equal to the current date.

ree
ree

Similarly, add a condition to check if the DOB is after today.

ree

Click on the Submit button at the bottom, save the case, and test this validation. If you give DOB as the current date or a future date, then the validation will fire, and it will stop the assignment submission.

ree

Here we have chosen a field which is part of the Data type field (Customer), and this Data type field is defined in the Case type. For simplicity, you can choose any field which is defined in the Case type itself.


If you still help or try to play with this sample application. Please drop me a mail at - sandeshtorajesh@outlook.com and I will share you the RAP file which you can import into your Pega instance and check out the implementation.

Comments


©2022 by pegablogs. Proudly created with Wix.com

bottom of page