> ## Documentation Index
> Fetch the complete documentation index at: https://ratemyrentalco.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Forms and error recovery

> Design and build RateMyRental forms that preserve work and give people a clear way to recover.

**Proposed implementation baseline.** Use this pattern for review drafts and, if included at launch, owner claim and listing forms. Confirm product-specific validation, retention, and recovery rules before implementation. See [Forms baseline status](https://ratemyrentalco.com/docs/harbor/forms-baseline-status.md) for why this page stays proposed (open questions M03, E02, and E03).

## Choose the editing surface

* Use a page for long or multi-step tasks such as drafting a review or listing. Use a dialog for a short edit that belongs to the current record. Use a drawer for mobile filters.
* Use **Save draft**, **Save changes**, and **Submit for review** for distinct actions. Tell people when a draft is private and show what will become public. Allow immediate changes for independent, low-risk controls when people can undo or retry them.
* Group fields that depend on one another in the same form. For example, validate a move-out date against the move-in date as part of the submission.

## Validate and show errors

1. Use a visible label for every field. Place instructions beside the field and associate them programmatically. Indicate required fields in text.
2. After a field has been edited, validate when focus leaves it if the result helps the person continue. Validate the full form on submit and recheck authoritative rules on the server.
3. Keep entered values. Show each actionable error beside its field and associate it with the field. For multiple or related errors, move keyboard focus to a summary above the form. Each summary item links to the first field to fix and uses the same wording as the inline error.
4. Name the issue and how to fix it. For example, use **Enter a move-out date on or after your move-in date.** Show errors in text and keep them visible while they apply.

Use a confirmation dialog for an irreversible action. Name the affected record and explain what will happen when the person confirms.

## Recover interrupted work

| Situation | Expected behavior |
| - | - |
| Save failed | Keep the current values. Show a persistent message near the save action and offer a retry. Show which work was saved. |
| One upload failed | Show the status on the affected file and let people retry it. Preserve successful uploads and the rest of the form. |
| Session expired | Show **Your session expired. Sign in to continue.** Return the same account to the saved draft when possible. Move focus to the form heading or recovery notice and identify any fields that need re-entry. Keep sensitive verification material out of persistent browser storage. |
| A newer edit exists | Preserve the newer revision and the pending changes when recoverable. Tell the person what changed and provide a clear next action. |
| Submission was interrupted | Check whether the previous attempt already succeeded. Show the existing result or retry without creating a duplicate. |

## Acceptance checks

* Use a keyboard and a screen reader to submit an invalid form, reach the error summary, follow its links, and correct the fields. Confirm labels and error text are announced.
* Test invalid date order, unsupported attachments, partial upload failure, and a failed save. Confirm entered values and successful uploads survive retry.
* Resume an expired session with the same account and verify draft recovery and focus. Verify a different account cannot access that draft.
* Simulate a conflicting save and an interrupted submission. Confirm that newer work survives and the submission is recorded once.

## Design references

* [Harbor Launch Readiness](https://www.figma.com/design/wDCFNuzv9GjvMiBgiFbZxu?node-id=124-8)
* [Fields and Forms](https://www.figma.com/design/5VyOcrpOE3qsMo1s0cm9U4?node-id=186-445)
* [Attachment upload states](https://www.figma.com/design/5VyOcrpOE3qsMo1s0cm9U4?node-id=3-564)
* [GOV.UK error summary pattern](https://design-system.service.gov.uk/components/error-summary/)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.