diff --git a/config/schema.ts b/config/schema.ts index ba9e4ea2..1aa37595 100644 --- a/config/schema.ts +++ b/config/schema.ts @@ -6,7 +6,11 @@ const ethAddressRegex = /^0x[a-fA-F0-9]{40}$/; export const formSchema = z.object({ address: z.string().regex(ethAddressRegex, "Invalid Ethereum address"), networkId: z.string(), - deploymentBlock: z.number().optional(), + deploymentBlock: z.coerce + .number({ + invalid_type_error: "Invalid deployment block", + }) + .optional(), }); export const voteSchema = z.object({