errorcodelistxsd

cvc-enumeration-valid:Value is not in the declared enumeration (invalid code list entry)

Fix: Replace the invalid value with a valid entry from the relevant code list; Invoice Navigator applies safe mappings (PCS to H87, Kr to NOK, and similar) automatically where they exist. Provide the required value in the free validator.

cvc-enumeration-valid is an XSD facet-validation error raised when the value of an element or attribute does not appear in the enumeration the schema declares. The canonical message reads: "Value X is not facet-valid with respect to enumeration [A, B, C ...]. It must be a value from the enumeration." In EN 16931 invoices it fires on unit codes, currency codes, document type codes, and tax category codes.

Severity
Fatal
Rule set
xsd
Country
All EU
Fix type
INPUT REQUIRED
Confidence
75%

Engine Classification

Business data required · Explicit input workflow · No assumptions made

What is cvc-enumeration-valid?

cvc-enumeration-valid is a fatal validation rule defined in the xsd specification.

When this rule fires, the invoice is rejected by Peppol access points and never reaches the buyer.

Why This Error Matters

Code-list values are the glue between sender and receiver. A non-enumeration value is unreadable by the receiver's automated pipeline, so the document is rejected at the schema layer before any business rule runs.

cvc-enumeration-valid is a hard failure — the invoice must be corrected and re-sent before it can reach the recipient.

Validator Behavior

  • ·Causes invoice rejection
  • ·Error returned: cvc-enumeration-valid
  • ·Specification: xsd

Before / After

Failing XML
<cbc:InvoicedQuantity unitCode="PCS">10</cbc:InvoicedQuantity>
Corrected XML
<cbc:InvoicedQuantity unitCode="H87">10</cbc:InvoicedQuantity>

Technical Reference

Specxsd

Seeing this in production? The API handles cvc-enumeration-valid automatically. See the fix response →

Frequently Asked Questions

The error message lists the allowed values. A three-letter list starting with H87, KGM, MTR points to Rec 20 unit codes. A short currency list points to ISO 4217. A tax category list (S, Z, E, AE, K, G, L, M) points to UNTDID 5305 subset.

For common substitutions (unit code PCS to H87, currency Kr to NOK) Invoice Navigator applies the mapping automatically. For values with no safe mapping the caller must pick a replacement.

Different validators run against different code-list revisions. A code valid in Rec 20 Rev 9 may not be in Rev 16. Peppol Access Points use the revision bundled with the current BIS release.

cbc:InvoicedQuantity/@unitCode, cbc:DocumentCurrencyCode and cbc:PriceAmount/@currencyID, cac:ClassifiedTaxCategory/cbc:ID, cbc:InvoiceTypeCode, and cbc:PartyIdentification/cbc:ID/@schemeID.

Structural at the XSD level — the parser rejects the value before Schematron runs. But fixing it is semantic, because you must choose the right code for the actual business meaning. That is why the default fix strategy is input.

Related Content

Last updated: 22 April 2026

Share this guide:

Validate your invoice

Drop your XML here to check for cvc-enumeration-valid

Fix cvc-enumeration-valid with guided input

Upload your invoice and we'll ask for the missing data, then apply a safe, auditable fix.