mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-19 02:10:33 -05:00
fix: Incorrect Error Toast for Ending Card (#3306)
This commit is contained in:
committed by
GitHub
parent
3a49abda43
commit
e8403699e1
@@ -122,7 +122,8 @@ export const validateCardFieldsForAllLanguages = (
|
||||
// even if one of the keys is an empty string, its okay but it shouldn't be undefined
|
||||
|
||||
const cardTypeLabel =
|
||||
cardType === "welcome" ? "Welcome card" : `Redirect to Url ${((endingCardIndex ?? -1) + 1).toString()}`;
|
||||
cardType === "welcome" ? "Welcome card" : `Ending card ${((endingCardIndex ?? -1) + 1).toString()}`; // Ensure 1-based indexing
|
||||
|
||||
const path = cardType === "welcome" ? ["welcomeCard", field] : ["endings", endingCardIndex ?? -1, field];
|
||||
|
||||
for (const language of languages) {
|
||||
@@ -148,7 +149,7 @@ export const validateCardFieldsForAllLanguages = (
|
||||
|
||||
const message = isDefaultOnly
|
||||
? `${messagePrefix}${messageField} on the ${cardTypeLabel}${messageSuffix}`
|
||||
: `${messagePrefix}${messageField} on the ${cardTypeLabel}${messageSuffix} -fLang- ${invalidLanguageCodes.join()}`;
|
||||
: `${messagePrefix}${messageField} on the ${cardTypeLabel}${messageSuffix} -fLang- ${invalidLanguageCodes.join(", ")}`;
|
||||
|
||||
if (invalidLanguageCodes.length) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user