DT-CIUS-PT-020_5.3

The BT-22 does not meet the defined format: it is mandatory to prefix the value with the following '#ADDITIONALPROPERTY#' and suffice with '#'. The value must consist of a first part for the name, separated by "#", and for a second part for the value.

error: the document is invalid

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.

Context
//ubl:Invoice/cbc:Note | //cn:CreditNote/cbc:Note
Test
starts-with(normalize-space(.),'#ADDITIONALPROPERTY#') and not(matches(.,'^(#(ADDITIONALPROPERTY)#(.{1,50})#(.{1,50})#)$'))

Checked with Portugal CIUS-PT Invoice (UBL), Portugal CIUS-PT Credit Note (UBL)