DT-CIUS-PT-079.1
The BT-81 does not meet the defined format: it is mandatory to prefix the value with the following '#ENTITY@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
starts-with(normalize-space(.),'#ENTITY@ATMPAYMENT#') and not(matches(.,'^(#(ENTITY@ATMPAYMENT)#(.{1,20})#)$'))
Checked with Portugal CIUS-PT Invoice (UBL), Portugal CIUS-PT Credit Note (UBL)