Discussion
Pegasystems Inc.
JP
Last activity: 1 May 2023 12:24 EDT
Client-side validation not working on non-focused tab with Pega 8.6.3
Hi,
Customer reported that client-side validation stopped working after upgrading to 8.6.3. In this post, I will share the issue and solution.
- Step to reproduce the issue
1. Create a section that includes multiple tabs. In each tab, place a required field as below.
2. Run the section. Leave required fields in all tabs blank and click Submit. You can see only tab 1 complains as below. There are no validation errors on tab 2 and tab 3.
3. Fill in the required field in only tab 1, and leave other required fields in tab 2 and tab 3 blank. Then if you submit it, screen goes to next screen without complaining about tab 2 / 3. This means Required validation is only working for user-focused tabs. This is an incorrect behavior.
- Correct behavior
Below is the screenshot of running the same code with prior version (here, I used 8.6.0). This is a correct behavior.
1. Leave all required fields blank and click Submit. Notice all tabs complain as below, not only the user-focused tab.
2. Fill in required field in only tab 1, and leave other required fields blank in tab 2 and tab 3. Then if you submit it, system still validates tab 2 and 3 and complains as below. Required validation is working for all tabs regardless of its focus state.
- Root cause
This is a bug in 8.6.3. It is planned to be fixed in the future release (8.6.5).
- Resolution
Workaround is to implement a Validate rule (server-side validation) instead of cell properties' Required settings (client-side validation). Otherwise you can either wait for 8.6.5 to be released, or apply a hotfix (for 8.6.3, raise an SR to obtain HFIX-83348).
No | Hotfix | HFIX number | Description |
---|---|---|---|
1 | Parent Hotfix | HFIX-83348 | Client side validation is not getting triggered on submit |
2 | Dependent Hotfix | HFIX-83089 | Validation is not being triggered for empty value in RTE |
Hope this helps.
Thanks,