← All problems

STANDARD STARTER CONTRACT / validation-error

Validation failure

The content type and syntax are understood, but the request content cannot be processed because it fails validation.

HTTP 422

Canonical type URI

https://errors.ctrlbox.dev/problems/validation-error

This stable URI identifies the problem type, not a particular occurrence.

Possible causes

  • A required field is missing or a value is outside its allowed range.

What to do next

  • Correct the fields listed in errors before submitting again.

HTTP response contract

Set the actual HTTP status to 422 and Content-Type: application/problem+json. The JSON status below must agree with the actual response status.

RFC-defined members

type
The canonical URI above; clients use it as the primary problem identifier.
title
Validation failure — a stable human-readable summary (localization is permitted).
status
422 — advisory in the body; it does not set the HTTP status.
detail
A safe explanation specific to this occurrence. Clients should not parse it for machine decisions.
instance
An optional URI reference identifying a specific occurrence. It need not resolve; avoid sensitive identifiers.

These five members are defined by RFC 9457. This template includes type, title, status, and detail in its samples; RFC 9457 does not require all five.

Custom extension fields

errors array of { pointer: string, message: string }
Validation issues. pointer is a JSON Pointer into the request body; message is safe human-readable guidance.

Extensions belong to this type’s contract. Consumers must ignore extensions they do not recognize.

Example response body

Illustrative occurrence data. Construct the response manually in your application or automation.

Missing customer name

{
  "type": "https://errors.ctrlbox.dev/problems/validation-error",
  "title": "Validation failure",
  "status": 422,
  "detail": "One required field is missing.",
  "instance": "/occurrences/example-001",
  "errors": [
    {
      "pointer": "/customer/name",
      "message": "Provide a customer name."
    }
  ]
}

Keep established public type URIs stable. The names here are template conventions, not an RFC catalogue. Read the response guide for manual setup and standards references.