From 5985b47d7c685a54af438b77ce0b4fcce0ba13c1 Mon Sep 17 00:00:00 2001 From: Felix Wotschofsky Date: Sat, 6 Jan 2024 11:47:04 +0100 Subject: [PATCH] =?UTF-8?q?Support=20wildcard=20domains=20lookup=20?= =?UTF-8?q?=F0=9F=8C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/isValidDomain.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/isValidDomain.ts b/utils/isValidDomain.ts index a00d7b0..0c3ae4d 100644 --- a/utils/isValidDomain.ts +++ b/utils/isValidDomain.ts @@ -1,5 +1,5 @@ const isValidDomain = (domain: string) => - /^(((?!-))(xn--|_)?[a-z0-9-]{0,61}[a-z0-9]{1,1}\.)*(xn--)?([a-z0-9][a-z0-9\-]{0,60}|[a-z0-9-]{1,30}\.[a-z]{2,})$/.test( + /^(\*\.)?(((?!-))(xn--|_)?[a-z0-9-]{0,61}[a-z0-9]{1,1}\.)*(xn--)?([a-z0-9][a-z0-9\-]{0,60}|[a-z0-9-]{1,30}\.[a-z]{2,})$/.test( domain );