From e82d700edba62b00c9d43fe4676a7a2053053800 Mon Sep 17 00:00:00 2001 From: Rohit Date: Wed, 28 May 2025 14:51:09 +0530 Subject: [PATCH] feat: validate url format --- src/components/integration/IntegrationSettings.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/integration/IntegrationSettings.tsx b/src/components/integration/IntegrationSettings.tsx index e385a4d8..c964d6b7 100644 --- a/src/components/integration/IntegrationSettings.tsx +++ b/src/components/integration/IntegrationSettings.tsx @@ -133,6 +133,13 @@ export const IntegrationSettingsModal = ({ return false; } + try { + new URL(url); + } catch { + setUrlError("Please provide a valid URL"); + return false; + } + const existingWebhook = settings.webhooks?.find( (webhook) => webhook.url === url && webhook.id !== excludeId );