mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 08:27:36 +00:00
feat: updated to support in error in ui
This commit is contained in:
+8
-1
@@ -82,7 +82,14 @@ const ConditionSchema = z
|
|||||||
{ message: "Duplicate operator found for a condition" }
|
{ message: "Duplicate operator found for a condition" }
|
||||||
)
|
)
|
||||||
.refine(
|
.refine(
|
||||||
(val) => val.filter((el) => el.lhs === "secretPath").every((el) => el.rhs.startsWith("/")),
|
(val) =>
|
||||||
|
val
|
||||||
|
.filter((el) => el.lhs === "secretPath")
|
||||||
|
.every((el) =>
|
||||||
|
el.operator === PermissionConditionOperators.$IN
|
||||||
|
? el.rhs.split(",").every((i) => i.trim().startsWith("/"))
|
||||||
|
: el.rhs.trim().startsWith("/")
|
||||||
|
),
|
||||||
{ message: "Invalid Secret Path. Must start with '/'" }
|
{ message: "Invalid Secret Path. Must start with '/'" }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user