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 error does not go away for file path control

SA-31237

Summary



The user has configured a validation error to be displayed when .txt files are uploaded using file path control. after the validation error is displayed, if the user chooses to upload a file that is allowed (for example .pdf), the error icon next to the file upload does not go away. It appears as if the form is still in error state when the user submits the form, which is causing them to be confused about proceeding forward in the flow. The UI is not accurate to their adherence to the validation requirements.


Error Messages



Not applicable


Steps to Reproduce

  1. Add a filepath control to a section and configure a validation rule for it. 
  2. At runtime, add a file and trigger the validation error to be displayed. 
  3. Now choose a new file, the error icon is still displayed.


Root Cause



The errors will not be removed unless the UI is refreshed/resubmitted again. 

Resolution



Save the filepath control to custom ruleset and add the below snippet at the beginning of function updateDescription(src).

var errorElement = document.getElementById(src.name+"Error");
if(errorElement && errorElement.style.display == "block"){
errorElement.style.display = "none";
}


 

 

Suggest Edit

Published December 9, 2016 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

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

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
Contact us