refactor(validation): use Zod URL protocols

Refs #3821
This commit is contained in:
Marcos Paulo Diniz committed 2026-08-05 08:34:12 -03:00
1 parent 0c184e6d0c
commit 466d356ad1
2 files changed
+5 -8

No files matched your search

+1 -5
View File
@@ -35,11 +35,7 @@ const rocketChatSchema = baseSchema.extend({
address: z
.string()
.min(1, "Webhook URL is required")
.url("Please enter a valid URL")
.refine(
(url) => /^https?:\/\//i.test(url),
"Rocket.Chat webhook URL must use HTTP or HTTPS"
),
.url({ protocol: /^https?$/, message: "Please enter a valid URL" }),
});
const pagerDutySchema = baseSchema.extend({