'** ' displays with error message on screen flow
The display of validation message for screen flow with 'Allow errors' enabled is inconsistent.
For a mandatory field when no data is entered, client side validation is triggered and validation error appears below the property. However, when the user navigates to the next assignment and comes back to the previous assignment, the validation error appears with ** pre-pended to it.
This behavior is observed post Pega 7 platform upgrade.
** Value cannot be blank
Steps to Reproduce
- 'Allow errors' is checked on screen flow
- With validation error on first screen, navigate to next flow action.
- On navigating back to previous flow action '** ' is pre-pended to existing error message on screen.
The behavior of PRPC is correct and explained below.
2. User navigates to next screen in Screen Flow that causes a request to be sent to server. While processing this request, the error message on the Property added on client side is updated on Property in the Clipboard.
3. When user navigates back to first screen, it causes a request to be sent to server. While processing this request, server has to send message on the Property to browser and for that, it evaluates the messages on Property. During this evaluation, it tries to find Rule-Message with name "Value cannot be blank", but it cannot find one, and so it pre-pends ** to the message and it becomes "** Value cannot be blank". And, this is the reason, user now sees message as "** Value cannot be blank".
The behavior to pre-pend "** " to message is as per contract of Rule-Message. Check documentation of PublicAPI.getRuleMessage().
This is a valid documented behavior of PublicAPI getRuleMessage which adds '** ' when a Rule-Message is not found.