VRBL-REA-TR-1p2-19

Basic Info

Rule The Receipt Advice UUID must be a valid UUID.
Context /ubl:ReceiptAdvice/cbc:UUID
Pattern vrbl-receiptadvice-tr-1p2
Severity fatal

Used Template: IsUUID

Parameter Value
probe = .

Implementation

not(boolean(.))
or
(
	string-length(.) = 36
	and translate(substring(., 1, 8), '0123456789abcdefABCDEF', '') = ''
	and substring(., 9, 1) = '-'
	and translate(substring(., 10, 4), '0123456789abcdefABCDEF', '') = ''
	and substring(., 14, 1) = '-'
	and translate(substring(., 15, 4), '0123456789abcdefABCDEF', '') = ''
	and substring(., 19, 1) = '-'
	and translate(substring(., 20, 4), '0123456789abcdefABCDEF', '') = ''
	and substring(., 24, 1) = '-'
	and translate(substring(., 25, 12), '0123456789abcdefABCDEF', '') = ''
)