fix(forms): repair public form validation and reset

This commit is contained in:
Schubert Ferenc 2026-07-04 00:31:13 +02:00
parent 3456b04ed4
commit 7d5689cfa4
4 changed files with 24 additions and 17 deletions

View file

@ -13,7 +13,7 @@ export async function POST(request: Request) {
const subject = text(form.get("subject"));
const message = text(form.get("message"));
if (!name || !email.includes("@") || !subject || message.length < 10 || form.get("privacy") !== "on") {
if (!name || !email.includes("@") || !subject || message.length < 10 || form.get("privacyAccepted") !== "on") {
return NextResponse.json({ message: "Bitte füllen Sie alle Pflichtfelder aus." }, { status: 400 });
}