DT-CIUS-PT-079.4
The BT-82 does not meet the defined format: it is mandatory to prefix the value with the following '#DESCRIPTION@ATMPAYMENT#' 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:PaymentMeansCode | //cn:CreditNote/cac:PaymentMeans/cbc:PaymentMeansCode
exists(@name) and starts-with(normalize-space(@name),'#DESCRIPTION@ATMPAYMENT#') and not(matches(@name,'^(#(DESCRIPTION@ATMPAYMENT)#(.{1,125})#)$'))
Checked with Portugal CIUS-PT Invoice (UBL), Portugal CIUS-PT Credit Note (UBL)