From cbb57474eff07879a2ec25add398819a342cc070 Mon Sep 17 00:00:00 2001 From: Bernd Storath <999999bst@gmail.com> Date: Thu, 24 Jul 2025 10:23:44 +0200 Subject: [PATCH] allow empty dns --- src/server/utils/types.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/server/utils/types.ts b/src/server/utils/types.ts index 55d1d910..a6fbcfb0 100644 --- a/src/server/utils/types.ts +++ b/src/server/utils/types.ts @@ -40,9 +40,7 @@ export const AddressSchema = z .min(1, { message: t('zod.address') }) .pipe(safeStringRefine); -export const DnsSchema = z - .array(AddressSchema, { message: t('zod.dns') }) - .min(1, t('zod.dns')); +export const DnsSchema = z.array(AddressSchema, { message: t('zod.dns') }); export const AllowedIpsSchema = z .array(AddressSchema, { message: t('zod.allowedIps') }) @@ -82,6 +80,7 @@ export function validateZod( if (t) { let newMessage = null; if (v.message.startsWith('zod.')) { + console.log(v); switch (v.code) { case 'too_small': switch (v.origin) {