# HAP1650-8a

Source: https://xmlvalid.com/rules/HAP1650-8a

> The buyer is a public administration (NIF …), so its administrative centres must give all three DIR3 codes: the accounting office (01), the managing body (02) and the processing unit (03)….

- Level: error
- Rule sets: Facturae validation rules of the Spanish public sector Orden HAP/1650/2015, Facturae 3.2.x description of 6 June 2017
- Context: `/*:Facturae/*:Parties/*:BuyerParty`
- Test: `not(matches(string($nif), '^[PQS]')) or (every $role in ('01', '02', '03') satisfies $centres[normalize-space(*:RoleTypeCode) = $role])`

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