Rule reference · ISO 20022 schema (XSD)
BNK-ISO-005: Value is not an allowed code
The value is not one of the codes allowed by the ISO 20022 schema.
| Severity | BLOCKER Blocker: the run fails |
|---|---|
| Applies to | pain.001.001.09 and pain.001.001.03, against the official ISO 20022 schema |
| Source | ISO 20022 message schema (XSD) · Standards and sources |
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 / Xerces | libxml2 (xmllint, lxml) |
|---|---|
| cvc-enumeration-valid | [facet 'enumeration'] The value '…' is not an element of the set { … }. |
All codes in one table: pain.001 XSD validation errors.
Example
Synthetic XML fragments.
<PmtInf>
…
<CtrlSum>6460.44</CtrlSum>
<PmtTpInf>…</PmtTpInf>
<ReqdExctnDt>…</ReqdExctnDt>
<Dbtr>…</Dbtr>
<DbtrAcct>…</DbtrAcct>
<DbtrAgt>…</DbtrAgt>
<ChrgBr>SHA</ChrgBr>
<CdtTrfTxInf>…</CdtTrfTxInf>
<CdtTrfTxInf>…</CdtTrfTxInf>
<CdtTrfTxInf>…</CdtTrfTxInf>
<CdtTrfTxInf>…</CdtTrfTxInf>
</PmtInf><PmtInf>
…
<CtrlSum>6460.44</CtrlSum>
<PmtTpInf>…</PmtTpInf>
<ReqdExctnDt>…</ReqdExctnDt>
<Dbtr>…</Dbtr>
<DbtrAcct>…</DbtrAcct>
<DbtrAgt>…</DbtrAgt>
<ChrgBr>SLEV</ChrgBr>
<CdtTrfTxInf>…</CdtTrfTxInf>
<CdtTrfTxInf>…</CdtTrfTxInf>
<CdtTrfTxInf>…</CdtTrfTxInf>
<CdtTrfTxInf>…</CdtTrfTxInf>
</PmtInf>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.
- Charge bearer SHA, an MT103 code: ISO 20022 uses DEBT, CRED, SHAR or SLEV. FAIL · Download · Validate it
Explained in
Related rules: ISO 20022 schema (XSD)
- BNK-ISO-001: Element not expected at this position
- BNK-ISO-002: Required element missing
- BNK-ISO-003: Value does not match the required format
- BNK-ISO-004: Value length outside the schema limits
- BNK-ISO-006: Value has the wrong data type
- BNK-ISO-007: Too many digits or decimal places
- BNK-ISO-008: Number outside the allowed range
- BNK-ISO-009: Attribute not allowed or required attribute missing
- BNK-ISO-010: Unknown root element
- BNK-ISO-099: Schema violation
Questions
What does BNK-ISO-005 check?
The value is not one of the codes allowed by the ISO 20022 schema.
How do I fix “Value is not an allowed code”?
Correct the mapping that produces this element in the payment-generation configuration.
Validate a pain.001 fileFree, no account needed, files are not stored.