feat: Allow notes to have empty or null titles by updating schema, API validation, and frontend forms.

This commit is contained in:
2025-12-31 01:35:36 +01:00
parent 93170d17dc
commit 064d2ae748
3 changed files with 48 additions and 3 deletions

View File

@@ -11,7 +11,7 @@ import { Editor } from "@/components/editor/editor";
import { useTranslation } from "react-i18next";
const noteSchema = (t: any) => z.object({
title: z.string().min(1, t("Title is required")).max(200, t("Title too long")),
title: z.string().min(0, t("Title too long")).max(200, t("Title too long")),
content: z.string().optional(),
is_pinned: z.boolean().default(false),
tags: z.string().optional(), // Comma separated for now