fix(custom-widgets): keep URL errors inline

This commit is contained in:
Thomas Camlong committed 2026-07-20 19:11:58 +02:00
1 parent dc63dc750f
commit c1fca4c5a2
7 files changed
+151 -111

No files matched your search

@@ -61,6 +61,7 @@ export const customWidgetDefinitionSchema = z
.string()
.url()
.refine((value) => {
if (!URL.canParse(value)) return false;
const url = new URL(value);
return (url.protocol === "http:" || url.protocol === "https:") && !url.username && !url.password;
}, "Widget icons must use HTTP or HTTPS without embedded credentials")