---
title: "Recover after submitting a required field empty"
description: "Verify required-field validation, correction, and successful persistence while checking that the rejected attempt creates no partial record."
canonical_url: "https://vostride.com/agent-library/forms-validation/required-field-recovery.md"
md_url: "https://vostride.com/agent-library/forms-validation/required-field-recovery.md"
content_kind: "recipe"
topic: "forms-validation"
---

# Recover after submitting a required field empty

Verify required-field validation, correction, and successful persistence while checking that the rejected attempt creates no partial record.

## Risk

Required-field errors can vanish visually while leaving submission blocked, or the server can create a partial object before displaying an error. Test both rejection and recovery against record identity.

## Fixtures

- A test-owned contacts workspace starts without a contact named QA North Star.
- The creation contract requires Display name and accepts Notes as optional.
- An approved read-only verification hook can count matching contacts independently of the creation form.

## Steps

1. Open Create contact and verify the Display name and Notes fields are available.
2. Leave Display name empty, enter a distinctive note, and submit; verify a specific required-name error appears.
3. Run the prepared count check and verify no QA contact or partial contact carrying the distinctive note was created.
4. Enter QA North Star and resubmit once; verify the contact detail shows the correct name and preserved note.
5. Reload the detail and verify the saved name and note remain, then confirm the independent matching-record count is exactly one.

## Expected results

- The rejected submission creates zero records with the fixture note, including records with a blank name.
- The successful submission creates exactly one contact with both expected field values.
- Correcting the name clears the relevant error and leads to a persisted detail page.

## False-pass traps

- A success toast is insufficient without a stable record detail and independent count.
- Reentering the optional note would hide a validation rerender that accidentally discarded valid input.

## Cleanup

- Delete the newly created contact by its captured identifier and remove any unexpected partial fixture records.

## Use with agent-qa

Adapt this test design to your application's acceptance criteria and configured target using the [recipe execution guide](/agent-library/software-factory/turn-a-recipe-into-an-agent-qa-test.md). External fixture setup and non-UI checks require your own supported hooks or test tooling. Validate the authored test, execute it, and inspect the completed evidence; this recipe is not a recorded test result.

## References

- [agent-qa test](/docs/agent-qa/configuration/test.md)
- [agent-qa first test](/docs/agent-qa/guides/first-test.md)
- [agent-qa web testing](/docs/agent-qa/guides/web-testing.md)

- [Forms and validation QA recipes](/agent-library/forms-validation.md)
- [Software factory QA library](/agent-library.md)
