ValueProblem:
    | { reason: "required" }
    | { reason: "invalid" | "outOfRange"; text: string }

Why an entered value is not a valid value of its type:

  • required: there is no value;
  • invalid: the text is not a value of the type;
  • outOfRange: the text is a number, but the type can't hold it (e.g. 300 for TinyInt).