DT-CIUS-PT-007
The BT-8 only allows the following values: 3, 35, 432.
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/cac:InvoicePeriod/cbc:DescriptionCode | //cn:CreditNote/cac:InvoicePeriod/cbc:DescriptionCode
Test
(matches(.,'^(\d{1,3})$') and contains('3,35,432,', concat(normalize-space(.), ',')))
Checked with Portugal CIUS-PT Invoice (UBL), Portugal CIUS-PT Credit Note (UBL)