Skip to content

Invalid

The object that the validate function of a facet returns when the value is refused. The change that carried the value fails, and the person sees the message. The other possible answers are valid() and coerced(value).

A plugin builds this object with invalid(issue), and the documentation of that function contains an example.

readonly invalid: object;

The description of the problem that caused the value to be refused.

code: string;

A short name for the problem.

message: string;

The sentence that the person reads.

path?: string;

Where in the value the problem is, when the value has parts.