VALIDATION_REJECTED
The claim dictionary did not satisfy the ruleset's validation contract. HTTP 422. Every failing field is named at once.
The values you submitted to a check do not match what the ruleset declared. Nothing was solved; the response names every failing field, not the first one, so one corrected resubmission converges.
The envelope
{"ok": false,
"error": {"code": "VALIDATION_REJECTED",
"message": "2 fields failed validation",
"docs": "https://docs.agents.jaxon.ai/errors/validation-rejected.md",
"failure_count": 2,
"failures": [
{"field": "amount", "expected": "a number, optionally with a unit convertible to USD",
"received": "\"lots\""},
{"field": "has_receipt", "expected": "a boolean (true/false, yes/no) or \"unknown\"",
"received": "missing"}]},
"versions": {"...": "..."}}
field is the claim name, or the assertion name for a cross-claim failure. expected and received are written for a model to act on directly.
Common causes and the fix
- A claim omitted. Every declared claim must be present. A value you could not determine is submitted as the string
"unknown"— never omitted, never guessed. Unknown is an answer, not a guess. - Wrong type. A numeric claim got prose; a boolean got a sentence. Submit the value in the format the prompt pack specified.
- A unit that does not convert.
amountdeclares@unit USDand received"30000 JPY"with no converter bridging JPY and USD. Convert on your side, or add a converter with a factor a person supplied (dsail_add_unit_converter). - A unit on a claim that declares none. A numeric claim with no
@unitaccepts bare numbers only. - Out of range. The claim declares
@rangeand the value is outside it. - An enum value off the vocabulary. Enum claims accept exactly the declared members, double-quoted strings.
Converging in one hop
Fetch the prompt pack for the hash (GET /v1/prompt-pack/{ruleset_hash}); it states the exact validation rules per claim. Correct every field named in failures, then resubmit once. The dsail Python client's check_with_repair does this loop for you.
See also: Error codes.