Examples · Forms

Server-side errors

A 422 with field errors lands on the right inputs; an async rule checks availability.

The server is the source of truth for “taken” and “already registered”. When submit throws an HttpError with data.errors, each message is mapped onto its field. An async rule asks the server while you type, debounced and cancelled on the next keystroke.

Playground

What to notice

  • Try admin as a username: the async rule reports it before submit, the server rejects it on submit.
  • f.submitting and f.canSubmit drive the button; no manual flags.
  • The Server requests panel shows the 422 with its payload.

Sign up as ada with x@taken.com: two errors from one response.