fix(forms): repair public form validation and reset
This commit is contained in:
parent
3456b04ed4
commit
7d5689cfa4
4 changed files with 24 additions and 17 deletions
|
|
@ -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 });
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue