How to use Mock Error Payload Generator
- List the form or API field names.
- Choose the convention, number of payloads and subset mode.
- Generate and feed the payloads to your form error rendering tests.
Mock Error Payload Generator features
- Field-level error payloads in Laravel, Django REST, ASP.NET, JSON:API, Google, AWS, Stripe, RFC 9457, JSend, simple and GraphQL conventions
- Bulk generation: all fields, one field at a time or random subsets
- Codes and messages inferred from field names
- Field error catalogue table for quick review
- Seedable for stable snapshot tests
Mock Error Payload Generator example
Django REST payloads, one field at a time
Input:
Fields: email, password
Convention: Django REST, mode: one field at a timeOutput:
[
{ "case": 1, "invalidFields": ["email"], "status": 422, "body": { "email": ["Email must be a valid email address."] } },
{ "case": 2, "invalidFields": ["password"], "status": 422, "body": { "password": ["Password must be at least 10 characters."] } }
]Frequently asked questions about Mock Error Payload Generator
What is a field-level error payload?
The response a form receives when several inputs fail validation: a map of field names to messages (Laravel, Django REST), an errors dictionary with a traceId (ASP.NET), pointer-based errors (JSON:API), fieldViolations (Google) and more.
What does bulk mode do?
It produces many payloads at once — every field invalid, one field at a time, or random subsets — so you can snapshot-test how your UI renders each combination.
Are codes and messages realistic?
They are inferred from the field names (email → invalid_format, password → too_short, terms → must_be_true, userId → not_found) with neutral, human-readable messages you can adapt.