Skip to content

Commit

Permalink
fix: field-level messages are passed back via
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredperreault-okta committed Mar 23, 2022
1 parent e426082 commit b292b32
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/idx/remediators/Base/Remediator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export class Remediator {
const inputsFromRemediation = this.remediation.value || [];
inputsFromRemediation.forEach(inputFromRemediation => {
let input;
let { name, type, visible } = inputFromRemediation;
let { name, type, visible, messages } = inputFromRemediation;
if (visible === false) {
return; // Filter out invisible inputs, like stateHandle
}
Expand All @@ -182,6 +182,10 @@ export class Remediator {
if (Array.isArray(input)) {
input.forEach(i => inputs.push(i));
} else {
// guarantees field-level messages are passed back
if (messages) {
input.messages = messages;
}
inputs.push(input);
}
});
Expand Down

0 comments on commit b292b32

Please sign in to comment.