fix: validation error fixed for simple errors (#20395)

This commit is contained in:
Madhuri Sandbhor 2024-05-31 14:41:47 +02:00 committed by GitHub
parent 04a0109973
commit 20380c3536
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -72,6 +72,16 @@ const formatErrorMessages = (errors: FormErrors, parentKey: string, formatMessag
} else {
messages.push(...formatErrorMessages(value, currentKey, formatMessage));
}
} else {
messages.push(
formatMessage(
{
id: `${value}.withField`,
defaultMessage: value,
},
{ field: currentKey }
)
);
}
});