BR-CL-24 The attachment on supporting document 1 declares the mime code "application/zip" (BT-125-1), which EN 16931 does not admit
The attachment on supporting document 1 declares the mime code "application/zip" (BT-125-1), which EN 16931 does not admit. The list has exactly 6 entries — "application/pdf", "image/png", "image/jpeg", "text/csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" and "application/vnd.oasis.opendocument.spreadsheet" — and the shortness is the point: an invoice attachment has to be openable by a receiver, without the sender's software, ten years from now, and without executing anything. That rules out archives (which can hide anything), word-processor formats with macro capability, and vector formats that carry script. A perfectly legitimate ZIP of evidence still fails.
This rule is implemented and its error payload below is real, but the long-form write-up — normative text, worked example, divergence note — is not written yet. Everything the library knows about this rule is on this page. Ask and we will prioritise it.
- Business term
BT-125- Severity
fatal
What the library returns
The exact object in result.errors when this rule fires.
Generated by running @attestwire/en16931, not transcribed:
{
"rule": "BR-CL-24",
"field": "BT-125",
"severity": "fatal",
"message": "The attachment on supporting document 1 declares the mime code \"application/zip\" (BT-125-1), which EN 16931 does not admit. The list has exactly 6 entries — \"application/pdf\", \"image/png\", \"image/jpeg\", \"text/csv\", \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\" and \"application/vnd.oasis.opendocument.spreadsheet\" — and the shortness is the point: an invoice attachment has to be openable by a receiver, without the sender's software, ten years from now, and without executing anything. That rules out archives (which can hide anything), word-processor formats with macro capability, and vector formats that carry script. A perfectly legitimate ZIP of evidence still fails.",
"fix": "Set supportingDocuments[].attachment.mimeCode to one of the six admitted values — \"application/pdf\" is the safe default, and converting to PDF is usually easier than arguing with a receiving portal. Use externalUri (BT-124) to point at a document you cannot embed in an accepted format.",
"example": "\"attachment\": { \"filename\": \"timesheet.pdf\", \"mimeCode\": \"application/pdf\", \"content\": \"JVBERi0xLjQK\" }",
"xpath": "/ubl:Invoice/cac:AdditionalDocumentReference[1]/cac:Attachment/cbc:EmbeddedDocumentBinaryObject/@mimeCode",
"docsUrl": "https://attestwire.com/rules/BR-CL-24"
}
xpath locates the element in the generated UBL document,
which is where a KoSIT or Peppol validator will report the same problem.
A passing value
"attachment": { "filename": "timesheet.pdf", "mimeCode": "application/pdf", "content": "JVBERi0xLjQK" }The fix
Set supportingDocuments[].attachment.mimeCode to one of the six admitted values — "application/pdf" is the safe default, and converting to PDF is usually easier than arguing with a receiving portal. Use externalUri (BT-124) to point at a document you cannot embed in an accepted format.