DT-CIUS-PT-003_i

The BT-3 only allows the following values: 380, 383, 386, 389, FT, FS, FR, ND, RP, RE, CS, LD, RA.

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.

Message

[DT-CIUS-PT-003] The BT-3 only allows the following values: 380, 383, 386, 389, FT, FS, FR, ND, RP, RE, CS, LD, RA.

Context
//ubl:Invoice/cbc:InvoiceTypeCode
Test
(matches(.,'^([A-Z0-9]{2,3})$') and contains('380,383,386,389,FT,FS,FR,ND,RP,RE,CS,LD,RA,', concat(normalize-space(.), ',')))

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