Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1972 Resolve Error message during validations in Common Properties #1973

Merged
merged 3 commits into from
May 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ function _validateInput(propertyId, controller, control, showErrors) {
if (isError) {
errorSet = true;
}
} else if (!isError && !errorSet) {
} else if ((!isError && !errorSet) || (!isError && errorSet)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

errorSet would never be true since the only place it's set to true is in the if part of this block. I'm not sure how this would work.

Copy link
Contributor Author

@srikant-ch5 srikant-ch5 May 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @matthoward366 It is working in below case

evaluate.mov

So in the first iteration of for (const validation of validations) errorSet is set as true in above condition and in next iteration we are checking if it is true

const msg = controller.getErrorMessage(msgPropertyId, false, false, false);
if (!isEmpty(msg) && (msg.validation_id === errorMessage.validation_id)) {
controller.updateErrorMessage(msgPropertyId, DEFAULT_VALIDATION_MESSAGE);
Expand Down