Validation rules
cvc-complex-type.2.4.a — EN 16931 rule
An element appears where the schema does not expect it — it is unknown, misspelled, or out of order. UBL is strictly order-sensitive; the validator names the element it found and the elements it expected instead.
- Rule
cvc-complex-type.2.4.a— official EN 16931 / XRechnung rule- Severity
- error
- Detected by
- tier 2 — XML schema (XSD)
- Reachability
- Only reachable when validating your own XML — normbill-generated documents cannot trigger it
normbill's serializer emits schema-valid XML by construction; this can only fire for XML submitted to /v1/invoices/validate.
How to fix it
Fix the child order (or the element name) to match the UBL 2.1 sequence. The reported element is where the mismatch was detected — the actual culprit is often the element just before it.
cvc-complex-type.2.4.a auf Deutsch — was bedeutet der Fehler?
Der KoSIT-Validator lehnt das Dokument bereits bei der XML-Schema-Prüfung (XSD) ab: Ein Element steht an einer Stelle, an der das Schema es nicht erwartet — unbekannt, falsch geschrieben oder in falscher Reihenfolge. UBL ist strikt reihenfolgesensitiv; die Meldung nennt das gefundene Element und die stattdessen erwarteten.
So beheben Sie den Fehler
Bringen Sie die Kindelemente in die Reihenfolge der UBL-2.1-Sequenz (oder korrigieren Sie den Elementnamen). Gemeldet wird die Stelle, an der die Abweichung auffiel — der eigentliche Verursacher ist oft das Element unmittelbar davor.
Official sources
- XRechnung specification (KoSIT / xeinkauf.de)
- KoSIT validator on GitHub and the XRechnung validator configuration
Every 422 from the API lists the rule id, the path in your request JSON, a plain-language message and a suggested fix — see the docs overview for the report format.
Or try it live: drop any XRechnung XML on the free validator — same KoSIT-backed report, no account.