improvements: update regex checks

This commit is contained in:
Scott Wilson
2025-04-22 17:57:59 -07:00
parent d61e6752d6
commit 7bd312a287
3 changed files with 5 additions and 1 deletions
@@ -1,3 +1,4 @@
import RE2 from "re2";
import { z } from "zod";
import { SecretRotations } from "@app/lib/api-docs";
@@ -29,6 +30,7 @@ export const PasswordRequirementsSchema = z
}),
allowedSymbols: z
.string()
.regex(new RE2("[!@#$%^&*()_+\\-=\\[\\]{};':\"\\\\|,.<>\\/?~]"), "Invalid symbols")
.optional()
.describe(SecretRotations.PARAMETERS.GENERAL.PASSWORD_REQUIREMENTS.allowedSymbols)
})