Support Article
Invalid message displayed at the top, without Enter is mandatory
SA-25869
Summary
Unnecessary error message is displayed at the top when user clicks submit without entering mandatory fields.
Error Messages
"Show next error" is shown on the screen
Steps to Reproduce
1. Create a case with some mandatory fields in that.
3. Without entering mandatory fields, click Submit button to submit the case.
4. It shows some invalid error message on the top.
Root Cause
In an assignment, if a validation of required is kept for a control and if user processes the assignment by keeping the control value empty in a dynamic layout group, then one can see an error message in the dynamic layout group.
When a tool tip is generated for the required filed a div is generated with the id=""iconErrorDiv"
If it exists then in webwb • pzpega_ui_layoutgroup js there is function which adds error message div
_addLayoutErrorMessage = function(layout) {
var iconErrorDivsSize = layout.find(".iconErrorDiv, .inputErrorDiv").filter(pega.u.d.isDisplayNone).length,
message;
// If there are errors, create the error table if it doesn't exist and set a message
if(iconErrorDivsSize == 1) {
message = pega.u.d.fieldValuesList.get("Error");
} else {
message = pega.u.d.fieldValuesList.get("Show next error");
}
errorTable = layout.children(".errorText");
if (errorTable.length == 0) {
layout.prepend("<div class='errorText error-table' style='width:100%; padding:10px;border-bottom:none;'>" + message + "</div>").children(".errorText").click(_goToNextError);
} else {
errorTable.text(message);
}
},
Resolution
Add the below code in the Userworkform:
<style>
.content-layout-group > .error-table {
cursor: pointer;
display: none !important;
}
</style>
Published July 28, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.