VRBL-INV-TR-1p2-3

Basic Info

Rule The Invoice Number must consist of a 3-character alphanumeric prefix, the year number and a 9-digit consecutive number, e.g. ABC2025123456789.
Context /ubl:Invoice/cbc:ID
Pattern vrbl-invoice-tr-1p2
Severity fatal

Implementation

string-length(.)=16
and
translate(substring(., 1, 3), $AlphaNumerics, '')=''
and
substring(., 4, 2)='20' and translate(substring(., 6, 2), $Numerics, '')=''
and
translate(substring(., 8, 9), $Numerics, '')=''