Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Validation message is lost on focusing in and out of the field

SA-72767

Summary



Validation message is lost on focusing in and out of the field.


Error Messages



Not Applicable.


Steps to Reproduce

  1. Create a mandatory field
  2. Add an action set on change to refresh the section
  3. Add a validation rule in the flow action
  4. Enter an incorrect value
  5. Focus in and out of the field


Root Cause



Client side validation called during refresh section removes the server side validation.


Resolution

Perform the following local-change:

Add the below code in the UserWorkForm:


<script> $(document).ready(function(){ function display_showImageErrors(errorList, successList, serverErrors) { var display_removeErrorImageRef = display_removeErrorImage; var display_addImageErrorRef = display_addImageError; if ((serverErrors != true) && !(serverErrors && serverErrors.type === "blur")) { var successListLength = successList.length; for (var i = 0; i < successListLength; i++) { display_removeErrorImageRef(successList[i]); // only call if we have tab group included if (typeof pega.u.d.handleErrorsInTabgroupLayout == "function") { pega.u.d.handleErrorsInTabgroupLayout(successList[i], "clear"); } } } var errorListLength = errorList.length; for (var i = 0; i < errorListLength; i++) { display_removeErrorImageRef(errorList[i].element); } for (var i = 0; i < errorListLength; i++) { display_addImageErrorRef(errorList[i]); // only call if we have tab group included if (typeof pega.u.d.handleErrorsInTabgroupLayout == "function") { pega.u.d.handleErrorsInTabgroupLayout(errorList[i].element, "add"); } } if (window.LayoutGroupModule) { LayoutGroupModule.checkForErrors(); } } validation_displayErrors = display_showImageErrors; validation_displayFieldError = display_showImageErrors; }); </script>

 

 

Published February 7, 2019 - Updated December 2, 2021

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice