VRBL-INV-SE-1p0-14

Basic Info

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