Attestwire › Rule reference › ATW-NUMBER-TOO-LARGE
ATW-NUMBER-TOO-LARGE A number is too large to write or compute exactly
noun · Attestwire · fatal · BG-25
For a sample invoice, the library reports: lines[0].grossUnitPrice is 1e+21, at or above 1e21, which cannot be written as an xs:decimal without exponent notation.
- Business term
BG-25- Severity
fatal
The fix
Check the unit: a value this size is almost always a slip upstream.
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-NUMBER-TOO-LARGE",
"field": "BG-25",
"severity": "fatal",
"message": "lines[0].grossUnitPrice is 1e+21, at or above 1e21, which cannot be written as an xs:decimal without exponent notation.",
"fix": "Check the unit: a value this size is almost always a slip upstream.",
"docsUrl": "https://github.com/attestwire/en16931#not-implemented-yet"
}