Peppol BIS Billing 3.0.21 · UBL

BR-CL-15: Country codes in an invoice MUST be coded using ISO code list 3166-1

Peppol BIS Billing 3.0.21 · UBL

fatalbusiness

Original rule text

[BR-CL-15]-Country codes in an invoice MUST be coded using ISO code list 3166-1

Stored validation assertion
((not(contains(normalize-space(.), ' ')) and contains(' 1A AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS XI YE YT ZA ZM ZW ', concat(' ', normalize-space(.), ' '))))

BR-CL-15 is a fatal rule in the business layer of Peppol BIS Billing 3.0.21 · UBL. An invoice that breaks it is rejected.

What this rule requires

Rule BR-CL-15 requires the country code in the invoice's origin country element to be a value from the ISO 3166-1 code list accepted by the rule. In UBL this is cac:OriginCountry/cbc:IdentificationCode; in CII it is ram:OriginTradeCountry/ram:ID. The test normalizes surrounding whitespace, rejects any value containing an internal space, and then checks that the normalized value appears in the rule's fixed list of accepted codes. A document fails when the element is empty, contains whitespace within the code, or uses a code not in that list.

How to fix

Set the country code element to one of the ISO 3166-1 codes listed in the rule, such as DE, FR, or US, and ensure the value has no internal spaces. If the invoice currently uses a different code or a free-text country name, replace it with the appropriate listed ISO code. Check the exact element: cac:OriginCountry/cbc:IdentificationCode for UBL or ram:OriginTradeCountry/ram:ID for CII.

Guidance on this rule. The original text above is authoritative.

Where to go next

No published Peppol BIS Billing UBL release comparison lists a change to BR-CL-15.

Validate an invoice against these rules · All release changes