BankLint

Rule reference · ISO 20022 schema (XSD)

BNK-ISO-007: Too many digits or decimal places

The number has more digits or more decimal places than the ISO 20022 schema allows.

SeverityBLOCKER Blocker: the run fails
Applies topain.001.001.09 and pain.001.001.03, against the official ISO 20022 schema
SourceISO 20022 message schema (XSD) · Standards and sources

What this finding covers

  • Too many decimal places. The value has more fraction digits than the ISO 20022 schema allows.
  • Too many digits. The value has more total digits than the ISO 20022 schema allows.

Why it matters

Banks validate payment files against the ISO 20022 schema and typically reject the whole file on a schema violation.

How to fix it

Correct the mapping that produces this element in the payment-generation configuration.

How other validators report it

The same schema error as printed by Java validators (Xerces, the W3C XML Schema rule code) and by libxml2 (xmllint, lxml). … stands for the element, value or limit in your file.

Java / Xerceslibxml2 (xmllint, lxml)
cvc-fractionDigits-valid[facet 'fractionDigits'] The value '…' has more fractional digits than are allowed ('…').
cvc-totalDigits-valid[facet 'totalDigits'] The value '…' has more digits than are allowed ('…').

All codes in one table: pain.001 XSD validation errors.

Example

Synthetic XML fragments.

Example that fails
<Amt>
  <InstdAmt Ccy="EUR">310.451234</InstdAmt>
</Amt>
Corrected
<Amt>
  <InstdAmt Ccy="EUR">310.45</InstdAmt>
</Amt>

Linty calls this bug the Schema Scuttler. Try it in Spot the bug

Try it with a synthetic example

These files are synthetic test data from BankLint's test corpus. Download one, or validate it directly.

  • An amount with six decimal places (310.451234): the schema allows at most five. FAIL · Download · Validate it

Explained in

Questions

What does BNK-ISO-007 check?

The number has more digits or more decimal places than the ISO 20022 schema allows.

How do I fix “Too many digits or decimal places”?

Correct the mapping that produces this element in the payment-generation configuration.

Validate a pain.001 fileFree, no account needed, files are not stored.