VRBL-INV-SE-1p0-15

Basic Info

Rule If the Payee Party Legal Entity Company ID is marked as a Swedish Legal Entity Number, it must be 10 digits.
Context /ubl:Invoice/cac:PayeeParty/cac:PartyLegalEntity/cbc:CompanyID
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'
)