VRBL-INV-SE-1p0-11

Basic Info

Rule If the Buyer Party Identification ID is marked as a Swedish Legal Entity Number, it must be 10 digits.
Context /ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID
Pattern vrbl-invoice-se-1p0
Severity fatal

Used Template: VRBL-SE-schemeID-0007

Implementation

not(@schemeID = '0007')
or
(
	string-length(normalize-space(.)) = 10
	and
	string(number(normalize-space(.))) != 'NaN'
)