The value was present but did not match any of the expected types.
A required key was absent from the object.
The schema referenced a type name that is not registered.
The schema itself is malformed (empty type string, array with 2 entries, …).
Strict mode only: the object carried a key the schema does not declare.
The value was below a lower bound — too short, too few elements, or
numerically too small. minimum carries the bound that was violated.
The value was above an upper bound — too long, too many elements, or
numerically too large. maximum carries the bound that was violated.
The value had the right type but the wrong shape: not an email, not a
UUID, not an integer, no match for the given pattern. expected names
the format.
A Validator function supplied in the schema threw.
An undeclared __proto__, constructor or prototype own key was
present and could not be removed, because the object is frozen or the
property is non-configurable. On a normal object the key is stripped
silently and no issue is reported.
Machine-readable reason a value failed validation.
Prefer branching on this over matching the human-readable
message, which is formatted for people and is not part of the stable API.