Merge pull request #2033 from Infisical/misc/added-secret-name-trim

misc: added secret name trimming
This commit is contained in:
Sheen Capadngan
2024-06-29 01:14:23 +08:00
committed by GitHub
3 changed files with 3 additions and 3 deletions
@@ -11,7 +11,7 @@ import { SecretType, UserWsKeyPair } from "@app/hooks/api/types";
import { PopUpNames, usePopUpAction, usePopUpState } from "../../SecretMainPage.store";
const typeSchema = z.object({
key: z.string(),
key: z.string().trim().min(1, { message: "Secret key is required" }),
value: z.string().optional()
});
@@ -22,7 +22,7 @@ import { DecryptedSecret, SecretType, UserWsKeyPair } from "@app/hooks/api/types
const typeSchema = z
.object({
key: z.string().min(1, "Key is required"),
key: z.string().trim().min(1, "Key is required"),
value: z.string().optional(),
environments: z.record(z.boolean().optional())
})