Server-Side Errors
Errors that only the server can detect: duplicate emails, expired codes.
Form validation patterns with Superforms v2 + Valibot v1.
Errors that only the server can detect: duplicate emails, expired codes.
setError(form, 'field', 'msg') adds per-field errors. message(form, 'msg', { status: 400 }) sets a form-level message with error status. Both are used for conditions only the server can check (database lookups, rate limits, etc.).