diff --git a/frontend/src/components/content-types/ContentTypeForm.tsx b/frontend/src/components/content-types/ContentTypeForm.tsx index 8276cd9c..260438fd 100644 --- a/frontend/src/components/content-types/ContentTypeForm.tsx +++ b/frontend/src/components/content-types/ContentTypeForm.tsx @@ -53,11 +53,11 @@ export const ContentTypeForm: FC> = ({ name: "fields", rules: { validate: (fields) => { - const hasDuplicatedLabels = + const hasUniqueLabels = new Set(fields.map((f) => f["label"] as string)).size === fields.length; - if (hasDuplicatedLabels) { + if (!hasUniqueLabels) { toast.error(t("message.duplicate_labels_not_allowed")); return false;