Skip to content
XRechnung · Understanding errors

cvc-complex-type.2.4.a: mandatory element missing or wrong order

The message cvc-complex-type.2.4.a comes from the schema validation, before the business rules. It means: at this point the validator expected a different element. Either a mandatory element such as the invoice number is missing, or the elements are in the wrong order.

Reproduced on 21 Nov 2026 with the KoSIT validator 1.6.3 (XRechnung 3.0.2, configuration of 31 Aug 2026) on our sample invoice. Written by Marwan Saleh (Development). Technical explanation, not tax advice.

The message in the validation report

This is the literal wording in the validator's report.

cvc-complex-type.2.4.aError

Ungültiger Content wurde beginnend mit Element '{"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2":IssueDate}' gefunden. …

Translation: Invalid content was found starting with element '{"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2":IssueDate}'. …

How we reproduced the error

The starting point was our correct sample invoice, which the validator accepts with 0 errors and 0 warnings. Then we changed exactly one thing:

Two runs: removed the invoice number cbc:ID, then removed the invoice date cbc:IssueDate. Both times the schema reports the next element as "invalid content".

Result: rejected with cvc-complex-type.2.4.a.

The correct sample invoice and its validation report are publicly available, see validation evidence.

Common causes

  • A mandatory element is missing, for example invoice number or date.
  • Elements are written in a different order than the UBL schema specifies.

How to fix the error

  1. 1The text of the message names the element at which the error was noticed. The missing element is usually directly before it.
  2. 2Output elements in the order of the UBL schema, ideally with a library rather than by hand.

This is how the spot looks in our accepted sample invoice:

<cbc:ID>RE-2027-0042</cbc:ID>
<cbc:IssueDate>2027-01-15</cbc:IssueDate>

After the correction: validate the file for free with the KoSIT validator, without sign-up, the file is not stored.

The error comes from your shop or your software?

Then the cause usually lies at the point where the invoice is generated. We check where the data comes from and adjust the output. The feasibility check costs €290 net and is credited if you place the order.

Sources

Validation run of 21 Nov 2026. Technical explanation, not tax advice.