Attestwire › Rule reference › ATW-INPUT-TYPE
ATW-INPUT-TYPE Every field must have the type the input model expects
noun · Attestwire · fatal · BG-16
For a sample invoice, the library reports: payment.meansCode should be text, but it is a number. The rules and the generators rely on the InvoiceInput types.
- Business term
BG-16- Severity
fatal
The fix
Set payment.meansCode to text, or leave it out. A value parsed from JSON or a form is the usual cause: "19" where 19 is expected, or null for a field that is simply absent.
What the library returns
The full error returned by @attestwire/en16931. It includes the rule ID,
affected field and suggested correction. Developers can use this object in their application:
{
"rule": "ATW-INPUT-TYPE",
"field": "BG-16",
"severity": "fatal",
"message": "payment.meansCode should be text, but it is a number. The rules and the generators rely on the InvoiceInput types.",
"fix": "Set payment.meansCode to text, or leave it out. A value parsed from JSON or a form is the usual cause: \"19\" where 19 is expected, or null for a field that is simply absent.",
"docsUrl": "https://github.com/attestwire/en16931#not-implemented-yet"
}