# BR-KSA-44

Source: https://xmlvalid.com/rules/BR-KSA-44

> If it exists in the invoice,the buyer VAT registration number or buyer group VAT registration number (BT-48) must contain 15 digits. The first digit and the last digit is "3".

- Level: error
- Rule sets: ZATCA e-invoicing rules (Saudi Arabia) SDK 3.4.6
- Context: `//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID`
- Test: `matches(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID, '^[0-9]{15}$') and starts-with(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID, '3') and ends-with(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID, '3')`

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