Arsal MuradAI and automation engineer

By Muhammad Arsal Murad ·

Mustang 2.26.0 says valid. The official KoSIT validator says no.

If you generate ZUGFeRD or Factur-X invoices and check them with Mustang, this one is worth five minutes.

Mustang 2.26.0, the current release, doesn't run the full EU rule set (the CEN EN 16931 Schematron) on EN 16931 and Basic invoices. It only runs it for XRechnung. So some errors that the official German validator rejects go straight through Mustang as valid.

I found this while comparing validators on a real test invoice someone sent me. Below is an invented invoice that shows the same thing, so you can check it yourself.

The repro

The file is a plain EN 16931 invoice in CII syntax: one line, 7% VAT, totals that add up. The only problem: currencyID="EUR" is set on eight amounts. The EN 16931 rules for CII allow currencyID on TaxTotalAmount only. That's rule CII-DT-031, and the CEN rule set marks it as fatal.

Download: with-currencyid.xml (and the clean version without the error)

Validator Result
Mustang-CLI 2.26.0, --action validate <summary status="valid"/>, exit code 0
KoSIT validator 1.6.3, config 2026-08-31 rejected, 8 × CII-DT-031
Conformo 0.2.5 (CLI 0.2.4) invalid, 8 × CII-DT-031

The clean version passes all three.

Commands, if you want to run it:

java -jar Mustang-CLI-2.26.0.jar --action validate --source with-currencyid.xml
npx @conformo/cli validate with-currencyid.xml

Why Mustang lets it through

There are two reasons, and you need both for this to happen.

  1. In 2.26.0, Mustang runs the CEN CII Schematron only when the profile contains "xrechnung" (XMLValidator.java in the validator module, release tag core-2.26.0). For EN 16931 and Basic it relies on the bundled Factur-X 1.09.2 Schematron instead.
  2. In that Factur-X file, the currencyID check is a plain report with no rule id and no severity flag ("marked as not used in the given context"). Mustang 2.26.0 only counts failed asserts as errors, so this report never shows up as one.

The result: anything that is only checked in the CEN rule set can pass Mustang 2.26.0 for these profiles. CII-DT-031 is the one I can prove with a file. I'm not claiming a list of others I haven't tested.

It's already fixed, just not released

To be fair to Mustang: the maintainers fixed this on their master branch on 28 September 2026 (commit 8491403f, which references issue #1285, still open). That commit runs the CEN rules for Basic, EN 16931 and XRechnung. I built the current master branch and it rejects the file above with the same 8 errors. It just isn't in a release yet. The latest release on Maven Central is still 2.26.0.

I posted a similar test file on issue #1285 so the maintainers have a test case.

What to do until the next release

  • Fix the invoices. Drop currencyID from every amount except TaxTotalAmount. That's the whole fix.
  • Add a second check in your tests. The official KoSIT validator (Java) or Conformo (JavaScript, no Java, runs in Node or the browser) both catch this. Keep Mustang where it is; just don't let it be the only check.
  • Or build Mustang from master if you're comfortable running an unreleased build.

One more thing: the XRechnung identifier

While I was at it: an identifier like urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_3.0 isn't a real XRechnung identifier. KoSIT finds no scenario for it and rejects the file. Mustang 2.26.0 checks it against the XRechnung 3.0 rules and only warns (BR-DE-21). The correct one for XRechnung 3.0 is urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0. Reported as Mustang issue #1343.


Disclosure: I build Conformo, an open-source e-invoicing toolkit, so I'm not neutral. Everything above can be checked with the files and commands on this page, using Mustang and KoSIT alone.

If you'd like me to run your own generator's output through all three validators, email me. That check is free.

Dieser Artikel auf Deutsch · All writing