diff --git a/apps/web/src/components/forms/notification-form.tsx b/apps/web/src/components/forms/notification-form.tsx index 5fc63c0f..27795c89 100644 --- a/apps/web/src/components/forms/notification-form.tsx +++ b/apps/web/src/components/forms/notification-form.tsx @@ -130,6 +130,10 @@ export function NotificationForm({ async function onSubmit({ provider, data, ...rest }: InsertNotification) { startTransition(async () => { try { + if (data === "") { + form.setError("data", { message: "This field is required" }); + return; + } if (defaultValues) { await api.notification.update.mutate({ provider,