# BR-09

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

> The Seller postal address (BG-5) shall contain a Seller country code (BT-40).

- 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:AccountingSupplierParty/cac:Party/cac:PostalAddress`
- Test: `normalize-space(cac:Country/cbc:IdentificationCode) != ''`

> The Seller postal address (BG-5) shall contain a Seller country code (BT-40).

- 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:SellerTradeParty/ram:PostalTradeAddress/ram:CountryID) != ''`

> The Seller postal address (BG-5) shall contain a Seller country code (BT-40).

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

> The Seller postal address (BG-5) shall contain a Seller country code (BT-40).

- 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:SellerTradeParty/ram:PostalTradeAddress/ram:CountryID!=''`

## Why it fails

- The seller's address has no `cac:Country/cbc:IdentificationCode` (`ram:CountryID` in CII), or the country is written out as a name.

## How to fix it

- Add the ISO 3166-1 alpha-2 code of the seller's country, such as `DE` or `FR`.

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