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.

  1. 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.

  1. 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.

  1. 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,

@KenshoTsuchihashi May I know where to check, whether this has been fixed or not? As we are facing this issue in 8.7.3 as well.

@Vigneshk2107 you can find reference to the fix for BUG-713854 in the Resolved Issues for Pega 8.7.2.

The equivalent bug for Pega 8.7.3 was not required as the changes that fixes this issue are already in place with BUG-713854 changes

As of 8.7.2 on submit of the form with layout group ‘tab’(with 2 tabs and required fields in first tab) after navigating to second tab The client side validations are now being triggered.

@KenshoTsuchihashi Thank you for this article!

I have a slightly different problem, I am not sure if I should write a new support article, or ask here:

We use the collapse function in Dynamic Layouts, and we need to collapse these layouts by default. We have validations concerning properties inside these collapsed layouts. First we had only client-side validations, and then we added also server-side validations.

But still, when user submits, even though the System does not move from current flow action, it does not show any validation error message. It only shows some messages when user expands a layout containing mandatory properties. Nothing on the top of the screen either.

I saw another article concerning an error symbol (How to add error symbol for collapse/expand layout | Support Center), but the thing, when you check the clipboard there are no messages there.

Should I create a separate article?

@Filipe Lopes Last update: there is an hotfix for the issue I described, and it was related to a specific control: AnyPicker. So, basically because I had an AnyPicker which was mandatory, it was blocking the other validations on the client-side, so it was not even reaching the server-side validations.