Support Article
Pega Validation not triggered for a label marked required
SA-71306
Summary
A label and a field are created and the label is marked required.
In Pega 7.1.9, a validation message, 'Value cannot be blank', displays and forces users to enter details in the fields.
Post Pega 7.4 update, users can submit the screen and validation is not triggered.
Error Messages
Not Applicable
Steps to Reproduce
- Add a label and mark it required in Pega 7.1.9.
- Add a field associated with the label and do not mark it required.
- Submit the work object. Validation is triggered.
- Update to Pega 7.4. Validation for the label marked required is not triggered.
Root Cause
An issue in the custom application code or rules. A free form layout is implemented which is deprecated. Along with the label, the fields or control were not marked as required.
Resolution
Perform the following local-change:
Use a dynamic layout instead of the free form layout (as it is deprecated), and perform the below steps:
- Drop the controls in the dynamic layouts.
- In the General tab of the Property panel, search for an option to provide labels to the control.
- Check the 'Use property default' checkbox if the property label is used, else do not check the checkbox and enter the label text. In this case, explicit label controls are not required (design has only dropdown controls or another control). The label name in the property panel of the control is implicitly mapped to the control. An additional label control and 'Label for' option is not required.
Published April 4, 2019 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.