Form validates required fields client-side with inline field-level errors
Why it matters
Submitters who discover missing or invalid fields only after hitting submit waste a full network round-trip, lose their place in the form, and frequently abandon. Directories that rely on server-only validation bleed 20-40% of completion rate on multi-field listings and push that friction onto the moderation queue as half-filled drafts. Inline field-level errors on blur catch mistakes at the point of input, keep scroll position intact, and give assistive technologies an accessible hook to announce problems, which matters directly to WCAG 2.2 SC 3.3.1 (Error Identification) and SC 3.3.3 (Error Suggestion) conformance.
Severity rationale
Critical because missing client validation directly tanks submission completion and violates WCAG 3.3.1/3.3.3 accessibility requirements.
Remediation
Wire a schema-driven form in components/SubmissionForm.tsx so every required field validates on blur and renders its error inline next to the input, not in a toast. Use react-hook-form with zodResolver so the same schema can be shared with server handlers:
const schema = z.object({
title: z.string().min(10, 'Title must be at least 10 characters'),
description: z.string().min(50, 'Description must be at least 50 characters'),
contactEmail: z.string().email('Invalid email address')
})
Render {errors.title && <span role="alert">{errors.title.message}</span>} under each input so screen readers announce the failure.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the User Submissions & Moderation Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- wcag:2.2 · 3.3.1 — Error Identification
Taxons
History
- 2026-04-18·v1.0.0·Initial import from directory-submissions-moderation·automated