VRBL-INV-PT-2p1-72

Basic Info

Rule The value of the Seller Country Identification Code must be contained in ISO 3166 Alpha-2 Country Code [VRBL-CL-CountryCode]. For more information visit: https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO3166/
Context /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cac:Country/cbc:IdentificationCode
Pattern vrbl-invoice-pt-2p1
Severity fatal

Used Template: CodeList

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

Implementation

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