mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-17 06:34:57 +00:00
refactor(secret-sync): consolidate secret name validation to a single check in SecretNameSchema
This commit is contained in:
@@ -43,6 +43,6 @@ export const GenericResourceNameSchema = z
|
||||
export const BaseSecretNameSchema = z.string().trim().min(1);
|
||||
|
||||
export const SecretNameSchema = BaseSecretNameSchema.refine(
|
||||
(el) => !el.includes(":"),
|
||||
"Secret name cannot contain colon."
|
||||
).refine((el) => !el.includes("/"), "Secret name cannot contain forward slash.");
|
||||
(el) => !el.includes(":") && !el.includes("/"),
|
||||
"Secret name cannot contain colon or forward slash."
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user