BankLint

Rule reference · ISO 20022 schema (XSD)

BNK-ISO-004: Value length outside the schema limits

The value is longer or shorter than the ISO 20022 schema allows for this element.

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

  • Value too long. The value is longer than the maximum length allowed by the ISO 20022 schema.
  • Value too short. The value is shorter than the minimum length allowed by the ISO 20022 schema.
  • Value length not allowed. The value does not have the exact length required by the ISO 20022 schema.

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-maxLength-valid[facet 'maxLength'] The value has a length of '…'; this exceeds the allowed maximum length of '…'.
cvc-minLength-valid[facet 'minLength'] The value has a length of '0'; this underruns the allowed minimum length of '1'.

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

Example

Synthetic XML fragments.

Example that fails
<GrpHdr>
  <MsgId>MSG-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</MsgId>
  <CreDtTm>2026-10-16T09:00:00</CreDtTm>
  <NbOfTxs>4</NbOfTxs>
  <CtrlSum>6460.44</CtrlSum>
  <InitgPty>…</InitgPty>
</GrpHdr>
Corrected
<GrpHdr>
  <MsgId>MSG-2026-0001</MsgId>
  <CreDtTm>2026-10-16T09:00:00</CreDtTm>
  <NbOfTxs>4</NbOfTxs>
  <CtrlSum>6460.44</CtrlSum>
  <InitgPty>…</InitgPty>
</GrpHdr>

Try it with a synthetic example

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

Explained in

Questions

What does BNK-ISO-004 check?

The value is longer or shorter than the ISO 20022 schema allows for this element.

How do I fix “Value length outside the schema limits”?

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

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