VRBL-INV-MX-1p0-27

Basic Info

Rule The value of the Month Range must be contained in Allowed Month Range [VRBL-CL-MX-AllowedMonthRange].
Context /ubl:Invoice/cac:InvoicePeriod
Pattern vrbl-invoice-mx-1p0
Severity fatal

Used Template: CodeList

Parameter Value
probe = $MonthRange
displayName_probe = Month Range
codeList = $VRBL-CL-MX-AllowedMonthRange

Implementation

not(boolean($MonthRange))
or
(
	(
		not(
			contains(
				normalize-space($MonthRange),
				substring($VRBL-CL-MX-AllowedMonthRange, 1, 1)
			)
		)
		and
		contains(
			$VRBL-CL-MX-AllowedMonthRange,
			concat(
				substring($VRBL-CL-MX-AllowedMonthRange, 1, 1),
				normalize-space($MonthRange),
				substring($VRBL-CL-MX-AllowedMonthRange, 1, 1)
			)
		)
	)
)