don't allow "none" as a classification class name

This commit is contained in:
Josh Hawkins
2025-12-18 08:41:47 -06:00
parent 657fb6da62
commit b052035046
2 changed files with 10 additions and 1 deletions
@@ -94,7 +94,14 @@ export default function Step1NameAndDefine({
objectLabel: z.string().optional(),
objectType: z.enum(["sub_label", "attribute"]).optional(),
classes: z
.array(z.string())
.array(
z
.string()
.refine(
(val) => val.trim().toLowerCase() !== "none",
t("wizard.step1.errors.noneNotAllowed"),
),
)
.min(1, t("wizard.step1.errors.classRequired"))
.refine(
(classes) => {
@@ -467,6 +474,7 @@ export default function Step1NameAndDefine({
)}
</div>
</FormControl>
<FormMessage />
</FormItem>
)}
/>