Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
refactor: update TTL validation across dynamic secret forms to allow a maximum of 10 years
Victor Santosc0618cf1d6e4
diff --git a/backend/src/ee/routes/v1/dynamic-secret-lease-router.ts b/backend/src/ee/routes/v1/dynamic-secret-lease-router.tsindex 26c27d0d3a..62911d5239 100644--- a/backend/src/ee/routes/v1/dynamic-secret-lease-router.ts+++ b/backend/src/ee/routes/v1/dynamic-secret-lease-router.ts@@ -2,7 +2,6 @@ import { z } from "zod";import { DynamicSecretLeasesSchema } from "@app/db/schemas";import { ApiDocsTags, DYNAMIC_SECRET_LEASES } from "@app/lib/api-docs";-import { daysToMillisecond } from "@app/lib/dates";import { removeTrailingSlash } from "@app/lib/fn";import { ms } from "@app/lib/ms";import { readLimit, writeLimit } from "@app/server/config/rateLimiter";@@ -32,8 +31,8 @@ export const registerDynamicSecretLeaseRouter = async (server: FastifyZodProvideconst valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- if (valMs > daysToMillisecond(1))- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),path: z.string().trim().default("/").transform(removeTrailingSlash).describe(DYNAMIC_SECRET_LEASES.CREATE.path),environmentSlug: z.string().min(1).describe(DYNAMIC_SECRET_LEASES.CREATE.environmentSlug),@@ -127,8 +126,8 @@ export const registerDynamicSecretLeaseRouter = async (server: FastifyZodProvideconst valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- if (valMs > daysToMillisecond(1))- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),projectSlug: z.string().min(1).describe(DYNAMIC_SECRET_LEASES.RENEW.projectSlug),path: zdiff --git a/backend/src/ee/routes/v1/dynamic-secret-lease-routers/kubernetes-lease-router.ts b/backend/src/ee/routes/v1/dynamic-secret-lease-routers/kubernetes-lease-router.tsindex f2751c635d..30de7f08a3 100644--- a/backend/src/ee/routes/v1/dynamic-secret-lease-routers/kubernetes-lease-router.ts+++ b/backend/src/ee/routes/v1/dynamic-secret-lease-routers/kubernetes-lease-router.ts@@ -2,7 +2,6 @@ import { z } from "zod";import { DynamicSecretLeasesSchema } from "@app/db/schemas";import { ApiDocsTags, DYNAMIC_SECRET_LEASES } from "@app/lib/api-docs";-import { daysToMillisecond } from "@app/lib/dates";import { removeTrailingSlash } from "@app/lib/fn";import { ms } from "@app/lib/ms";import { writeLimit } from "@app/server/config/rateLimiter";@@ -32,8 +31,8 @@ export const registerKubernetesDynamicSecretLeaseRouter = async (server: Fastifyconst valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be greater than 1min" });- if (valMs > daysToMillisecond(1))- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),path: z.string().trim().default("/").transform(removeTrailingSlash).describe(DYNAMIC_SECRET_LEASES.CREATE.path),environmentSlug: z.string().min(1).describe(DYNAMIC_SECRET_LEASES.CREATE.environmentSlug),diff --git a/backend/src/ee/routes/v1/dynamic-secret-router.ts b/backend/src/ee/routes/v1/dynamic-secret-router.tsindex 7fb3e8374a..0e48206dc8 100644--- a/backend/src/ee/routes/v1/dynamic-secret-router.ts+++ b/backend/src/ee/routes/v1/dynamic-secret-router.ts@@ -3,7 +3,6 @@ import { z } from "zod";import { DynamicSecretLeasesSchema } from "@app/db/schemas";import { DynamicSecretProviderSchema } from "@app/ee/services/dynamic-secret/providers/models";import { ApiDocsTags, DYNAMIC_SECRETS } from "@app/lib/api-docs";-import { daysToMillisecond } from "@app/lib/dates";import { removeTrailingSlash } from "@app/lib/fn";import { ms } from "@app/lib/ms";import { isValidHandleBarTemplate } from "@app/lib/template/validate-handlebars";@@ -60,8 +59,8 @@ export const registerDynamicSecretRouter = async (server: FastifyZodProvider) =>const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- if (valMs > daysToMillisecond(1))- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -130,8 +129,8 @@ export const registerDynamicSecretRouter = async (server: FastifyZodProvider) =>const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- if (valMs > daysToMillisecond(1))- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -142,8 +141,8 @@ export const registerDynamicSecretRouter = async (server: FastifyZodProvider) =>const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- if (valMs > daysToMillisecond(1))- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}).nullable(),newName: z.string().describe(DYNAMIC_SECRETS.UPDATE.newName).optional(),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/AwsElastiCacheInputForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/AwsElastiCacheInputForm.tsxindex 6924939808..c58f2a7544 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/AwsElastiCacheInputForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/AwsElastiCacheInputForm.tsx@@ -36,9 +36,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -48,9 +47,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),name: z.string().refine((val) => val.toLowerCase() === val, "Must be lowercase"),environment: z.object({ name: z.string(), slug: z.string() }),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/AwsIamInputForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/AwsIamInputForm.tsxindex 042eb56e97..35a4162248 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/AwsIamInputForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/AwsIamInputForm.tsx@@ -95,9 +95,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/AzureEntraIdInputForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/AzureEntraIdInputForm.tsxindex 05f85a9e6a..581c473b91 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/AzureEntraIdInputForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/AzureEntraIdInputForm.tsx@@ -37,9 +37,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -49,9 +48,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),name: z.string()diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/AzureSqlDatabaseInputForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/AzureSqlDatabaseInputForm.tsxindex 56a914977d..aece11f388 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/AzureSqlDatabaseInputForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/AzureSqlDatabaseInputForm.tsx@@ -75,8 +75,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -86,8 +86,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),name: slugSchema(),environment: z.object({ name: z.string(), slug: z.string() }),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/CassandraInputForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/CassandraInputForm.tsxindex ef05d8a83e..15f9387df8 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/CassandraInputForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/CassandraInputForm.tsx@@ -39,9 +39,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -51,9 +50,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),name: slugSchema(),environment: z.object({ name: z.string(), slug: z.string() }),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/CouchbaseInputForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/CouchbaseInputForm.tsxindex 3cc41bf2cc..17bfeddca2 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/CouchbaseInputForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/CouchbaseInputForm.tsx@@ -240,8 +240,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -251,8 +251,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),name: slugSchema(),environment: z.object({ name: z.string(), slug: z.string() }),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/ElasticSearchInputForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/ElasticSearchInputForm.tsxindex 31d68e877c..1d0b6c268e 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/ElasticSearchInputForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/ElasticSearchInputForm.tsx@@ -60,9 +60,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -72,9 +71,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),name: slugSchema(),environment: z.object({ name: z.string(), slug: z.string() }),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/KubernetesInputForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/KubernetesInputForm.tsxindex 8e92066958..4165805b1d 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/KubernetesInputForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/KubernetesInputForm.tsx@@ -99,8 +99,8 @@ const formSchema = zconst valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -110,8 +110,8 @@ const formSchema = zconst valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),name: slugSchema(),environment: z.object({ name: z.string(), slug: z.string() }),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/LdapInputForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/LdapInputForm.tsxindex 824538706b..7b73976258 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/LdapInputForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/LdapInputForm.tsx@@ -61,9 +61,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -73,9 +72,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),name: slugSchema(),environment: z.object({ name: z.string(), slug: z.string() }),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/MongoAtlasInputForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/MongoAtlasInputForm.tsxindex e19c095766..3b0c7bb3ba 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/MongoAtlasInputForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/MongoAtlasInputForm.tsx@@ -50,9 +50,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -62,9 +61,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),name: slugSchema(),environment: z.object({ name: z.string(), slug: z.string() }),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/MongoDBInputForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/MongoDBInputForm.tsxindex 0cdb72e27d..ac60a77b06 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/MongoDBInputForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/MongoDBInputForm.tsx@@ -40,9 +40,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -52,9 +51,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),name: slugSchema(),environment: z.object({ name: z.string(), slug: z.string() }),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/RabbitMqInputForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/RabbitMqInputForm.tsxindex 137ee0d95d..7b2e564644 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/RabbitMqInputForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/RabbitMqInputForm.tsx@@ -44,9 +44,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -56,9 +55,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),name: slugSchema(),environment: z.object({ name: z.string(), slug: z.string() }),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/RedisInputForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/RedisInputForm.tsxindex 940c43c9cb..472d307831 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/RedisInputForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/RedisInputForm.tsx@@ -37,9 +37,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -49,9 +48,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),name: slugSchema(),environment: z.object({ name: z.string(), slug: z.string() }),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/SapAseInputForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/SapAseInputForm.tsxindex b6909af2ae..621451fda9 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/SapAseInputForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/SapAseInputForm.tsx@@ -35,9 +35,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -47,9 +46,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),name: slugSchema(),environment: z.object({ name: z.string(), slug: z.string() }),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/SapHanaInputForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/SapHanaInputForm.tsxindex 66b974f66e..034afee2cb 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/SapHanaInputForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/SapHanaInputForm.tsx@@ -37,9 +37,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -49,9 +48,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),name: slugSchema(),environment: z.object({ name: z.string(), slug: z.string() }),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/SnowflakeInputForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/SnowflakeInputForm.tsxindex abbb115a32..11357e26ab 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/SnowflakeInputForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/SnowflakeInputForm.tsx@@ -35,9 +35,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -47,9 +46,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),name: slugSchema(),environment: z.object({ name: z.string(), slug: z.string() }),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/SqlDatabaseInputForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/SqlDatabaseInputForm.tsxindex 4119cf94df..0a836fec23 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/SqlDatabaseInputForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/SqlDatabaseInputForm.tsx@@ -75,9 +75,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -87,9 +86,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),name: slugSchema(),environment: z.object({ name: z.string(), slug: z.string() }),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/VerticaInputForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/VerticaInputForm.tsxindex 98cd41165f..b48eab8504 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/VerticaInputForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/VerticaInputForm.tsx@@ -66,8 +66,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -77,8 +77,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),name: z.string().refine((val) => val.toLowerCase() === val, "Must be lowercase"),environment: z.object({ name: z.string(), slug: z.string() }),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretAwsElastiCacheProviderForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretAwsElastiCacheProviderForm.tsxindex f741e8215f..5740e20618 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretAwsElastiCacheProviderForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretAwsElastiCacheProviderForm.tsx@@ -37,9 +37,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -49,9 +48,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}).nullable(),newName: slugSchema().optional(),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretAwsIamForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretAwsIamForm.tsxindex 687d0d52b4..555ed9eae3 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretAwsIamForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretAwsIamForm.tsx@@ -71,9 +71,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -83,9 +82,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}).nullable(),newName: slugSchema().optional(),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretAzureEntraIdForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretAzureEntraIdForm.tsxindex e6a09d7551..c9bfc92cc0 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretAzureEntraIdForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretAzureEntraIdForm.tsx@@ -22,9 +22,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -34,9 +33,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),newName: slugSchema().optional()});diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretAzureSqlDatabaseForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretAzureSqlDatabaseForm.tsxindex 36be1b8e59..77bb7aa1f8 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretAzureSqlDatabaseForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretAzureSqlDatabaseForm.tsx@@ -73,8 +73,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -84,8 +84,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),newName: slugSchema().optional(),metadata: zdiff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretCassandraForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretCassandraForm.tsxindex 3b95dc8d3b..515ee19e3b 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretCassandraForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretCassandraForm.tsx@@ -39,9 +39,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -51,9 +50,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}).nullable(),newName: slugSchema().optional(),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretCouchbaseForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretCouchbaseForm.tsxindex 4282ae2560..e69b3460fb 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretCouchbaseForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretCouchbaseForm.tsx@@ -241,8 +241,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -252,8 +252,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}).nullable(),newName: slugSchema().optional(),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretElasticSearchForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretElasticSearchForm.tsxindex e519423a59..000762bc5f 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretElasticSearchForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretElasticSearchForm.tsx@@ -58,9 +58,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -70,9 +69,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),newName: slugSchema().optional(),usernameTemplate: z.string().trim().nullable().optional()diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretKubernetesForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretKubernetesForm.tsxindex 0858816bfa..95f40f9f51 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretKubernetesForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretKubernetesForm.tsx@@ -97,8 +97,8 @@ const formSchema = zconst valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -108,8 +108,8 @@ const formSchema = zconst valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),newName: slugSchema().optional(),usernameTemplate: z.string().trim().optional()diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretLdapForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretLdapForm.tsxindex 75edf56000..09d345d3dd 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretLdapForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretLdapForm.tsx@@ -51,9 +51,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -63,9 +62,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}).nullable(),newName: slugSchema().optional(),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretMongoAtlasForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretMongoAtlasForm.tsxindex c381f395c2..5b577192ad 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretMongoAtlasForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretMongoAtlasForm.tsx@@ -50,9 +50,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -62,9 +61,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}).nullable(),newName: slugSchema().optional(),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretMongoDBForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretMongoDBForm.tsxindex 689a56b953..90c31e1f01 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretMongoDBForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretMongoDBForm.tsx@@ -33,9 +33,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -45,9 +44,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}).nullable(),newName: slugSchema().optional(),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretRabbitMqForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretRabbitMqForm.tsxindex ab40914f4d..d80acc6de9 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretRabbitMqForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretRabbitMqForm.tsx@@ -35,9 +35,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -47,9 +46,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),newName: slugSchema().optional(),usernameTemplate: z.string().trim().nullable().optional()diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretRedisProviderForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretRedisProviderForm.tsxindex d77c605e16..bc21a17d76 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretRedisProviderForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretRedisProviderForm.tsx@@ -38,9 +38,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -50,9 +49,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}).nullable(),newName: slugSchema().optional(),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretSapAseForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretSapAseForm.tsxindex 86327a767b..37dbae5eed 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretSapAseForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretSapAseForm.tsx@@ -37,9 +37,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),usernameTemplate: z.string().trim().nullable().optional(),maxTTL: z@@ -50,9 +49,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),newName: slugSchema().optional()});diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretSapHanaForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretSapHanaForm.tsxindex 8051f883c9..430f13e837 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretSapHanaForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretSapHanaForm.tsx@@ -37,9 +37,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -49,9 +48,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),newName: slugSchema().optional(),usernameTemplate: z.string().trim().nullable().optional()diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretSnowflakeForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretSnowflakeForm.tsxindex 5e23cb2a39..1cbc20cfb0 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretSnowflakeForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretSnowflakeForm.tsx@@ -35,9 +35,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -47,9 +46,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),newName: slugSchema().optional(),usernameTemplate: z.string().trim().nullable().optional()diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretSqlProviderForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretSqlProviderForm.tsxindex 6beeba1698..929a1485dc 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretSqlProviderForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretSqlProviderForm.tsx@@ -73,9 +73,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),maxTTL: z.string()@@ -85,9 +84,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- // a day- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}).nullable(),newName: slugSchema().optional(),diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretVertica.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretVertica.tsxindex e2f3e5b4d9..e4ccda9431 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretVertica.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretVertica.tsx@@ -64,8 +64,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),usernameTemplate: z.string().trim().nullable().optional(),maxTTL: z@@ -76,8 +76,8 @@ const formSchema = z.object({const valMs = ms(val);if (valMs < 60 * 1000)ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be a greater than 1min" });- if (valMs > 24 * 60 * 60 * 1000)- ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than a day" });+ if (valMs > ms("10y"))+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "TTL must be less than 10 years" });}),newName: z.string().refine((val) => val.toLowerCase() === val, "Must be lowercase")});