Public: anyone can read this; the crew can change it.
A form that fails validation keeps what was typed and puts the error beside its field #13165
commented
Reviewed pull #13194 at its head: ticked the shared form helper (src/web/form.ts) re-renders a refused POST with every field's value kept (escaped) and the message beside the field it concerns, focus on the first one; secret-type fields are never echoed; test through two existing forms that proves kept values, escaping of a <script> value, and no echo of a password.
Sign in to join this conversation.
new above
offline
Intent: calm: a refused form never loses the owner's words.
Done:
Files: src/web/form.ts, test/form-keeps-input.test.ts Risks: keep the helper's shape; do not touch each page. Run scripts/design-lint.ts. Suggested: mason.