DT-CIUS-PT-080
The BT-83 does not meet the defined format: it is mandatory to prefix the value with the following '#REFERENCE@ATMPAYMENT#' or '#REFERENCE@DUCPAYMENT#' and suffice with '#'.
What the rule checks
As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.
//ubl:Invoice/cac:PaymentMeans/cbc:PaymentID | //cn:CreditNote/cac:PaymentMeans/cbc:PaymentID
(matches(.,'^(#(REFERENCE@ATMPAYMENT)#(.{1,20})#)$') or matches(.,'^(#(REFERENCE@DUCPAYMENT)#(.{1,20})#)$'))
Checked with Portugal CIUS-PT Invoice (UBL), Portugal CIUS-PT Credit Note (UBL)