BR-KSA-85: Buyer phone must start with 0 or + followed by 4 to 15 digits

Explained by Matheel from ZATCA's rule text and the condition SDK 3.4.8 executes · Updated

Warning: accepted with a warningConditional, see belowFields: BT-57

If cac:AccountingCustomerParty/cac:Party/cac:Contact/cbc:Telephone (BT-57) is non-empty, it must match ^(?:0|\+)[0-9]{4,15}$: a leading 0 or + followed by 4 to 15 digits and nothing else. Spaces, dashes and brackets therefore fail.

How to fix it

Write the number without separators, e.g. <cbc:Telephone>+966500000000</cbc:Telephone> or <cbc:Telephone>0500000000</cbc:Telephone>.

ZATCA's official text

[BR-KSA-85]-The Buyer's contact phone number (BT-57) shall start with "0" or "+", followed by a maximum of 15 number and minimum 4 character after the "+" or "0" , if exist.
Source: ZATCA SDK 3.4.8 · ZATCA KSA rules

Fails when (the condition ZATCA's SDK runs)

string-length(//cac:AccountingCustomerParty/cac:Party/cac:Contact/cbc:Telephone) > 0 and not(exists(//cac:AccountingCustomerParty/cac:Party/cac:Contact/cbc:Telephone) and matches(//cac:AccountingCustomerParty/cac:Party/cac:Contact/cbc:Telephone, '^(?:0|\+)[0-9]{4,15}$'))

Related rules

Validate your invoice against ZATCA's rules

Paste the XML and see every error and warning. It runs in your browser; the invoice goes nowhere.

Validate an invoice or try Matheel