validation
Validation Error
400 Bad Request
Returned when an inbound JSON body fails to parse, or when a path
parameter (e.g. an Id) cannot be deserialised. The
errors map contains a single entry keyed by
"body" or "id" depending on which
extractor rejected the request.
For rule-constraint failures on a valid body (e.g.
#[field(min_length = 1)]), see
validation_failed (422).
Example RFC 7807 body — malformed JSON
{
"type": "https://ferra.rs/errors/validation",
"title": "Validation Error",
"status": 400,
"detail": "validation failed",
"errors": {
"body": ["invalid character '}' at line 1 column 12"]
}
}
← All error types