VRBL-INV-EN16931-CM-306

Basic Info

Rule The value of the Seller Country Identification Code must be contained in ISO 3166 Alpha-2 Country Code [VRBL-CL-EN16931-CountryCode].
Context /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cac:Country/cbc:IdentificationCode
Pattern vrbl-invoice-en16931-codesmodel
Severity fatal

Used Template: CodeList

Parameter Value
probe = .
codeList = $VRBL-CL-EN16931-CountryCode

Implementation

not(boolean(.))
or
(
	(
		not(
			contains(
				normalize-space(.),
				substring($VRBL-CL-EN16931-CountryCode, 1, 1)
			)
		)
		and
		contains(
			$VRBL-CL-EN16931-CountryCode,
			concat(
				substring($VRBL-CL-EN16931-CountryCode, 1, 1),
				normalize-space(.),
				substring($VRBL-CL-EN16931-CountryCode, 1, 1)
			)
		)
	)
)