update server services to support DNS type queries

This commit is contained in:
Alex committed 2026-05-11 10:01:42 -07:00
1 parent 98d2bbfbb9
commit 272e4b5014
4 files changed
+12 -6

No files matched your search

+5
View File
@@ -15,6 +15,11 @@ export const nameValidation = z
export const lowercaseEmailValidation = z.email().transform((val) => val.toLowerCase());
export const dnsServerValidation = z
.string()
.min(1, "DNS server is required")
.refine((v) => z.ipv4().safeParse(v).success || z.ipv6().safeParse(v).success, "Enter a valid IPv4 or IPv6 address (e.g. 8.8.8.8)");
export const booleanCoercion = z.preprocess((val) => {
if (val === "true" || val === true) return true;
if (val === "false" || val === false) return false;