Disabled submit button if secret name is empty

This commit is contained in:
Rhythm Bhiwani
2024-03-03 01:37:49 +05:30
parent e3e4a98cd6
commit 68296c1b99
2 changed files with 12 additions and 16 deletions
@@ -8,7 +8,7 @@ export enum SecretActionType {
}
export const formSchema = z.object({
key: z.string().trim(),
key: z.string().trim().min(1, { message: "Secret key is required" }),
value: z.string().transform((val) => (val.at(-1) === "\n" ? `${val.trim()}\n` : val.trim())),
idOverride: z.string().trim().optional(),
valueOverride: z