# BR-11

Source: https://xmlvalid.com/rules/BR-11

> The Buyer postal address shall contain a Buyer country code (BT-55).

- Level: error
- Rule sets: EN 16931 rules (UBL) 1.3.17, EN 16931 rules 1.3.16 (UBL), EXTENDED-CTC-FR rules (UBL) 1.4.0.04
- Context: `cac:AccountingCustomerParty/cac:Party/cac:PostalAddress`
- Test: `normalize-space(cac:Country/cbc:IdentificationCode) != ''`

> The Buyer postal address shall contain a Buyer country code (BT-55).

- Level: error
- Rule sets: EN 16931 rules (CII) 1.3.17, EN 16931 rules 1.3.16 (CII), EXTENDED-CTC-FR rules (CII) 1.4.0.04
- Context: `/rsm:CrossIndustryInvoice`
- Test: `normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:CountryID) != ''`

> The Buyer postal address shall contain a Buyer country code (BT-55).

- Level: error
- Rule sets: Romanian RO e-Factura rules (UBL) 1.0.9
- Context: `cac:AccountingCustomerParty/cac:Party/cac:PostalAddress`
- Test: `(cac:Country/cbc:IdentificationCode) != ''`

> The Buyer postal address shall contain a Buyer country code (BT-55).

- Level: error
- Rule sets: Factur-X BASIC WL rules 1.09, Factur-X EN 16931 rules 1.09.2, Factur-X EXTENDED rules 1.09.2
- Context: `/rsm:CrossIndustryInvoice`
- Test: `//ram:BuyerTradeParty/ram:PostalTradeAddress/ram:CountryID!=''`

## Why it fails

- The buyer's address has no `cac:Country/cbc:IdentificationCode` (`ram:CountryID` in CII).

## How to fix it

- Add the ISO 3166-1 alpha-2 code of the buyer's country.

Validate a document against these rules: https://xmlvalid.com/validate
