OfficeIMO.Invoicing.Validation
3.4.3
Prefix Reserved
See the version list below for details.
dotnet add package OfficeIMO.Invoicing.Validation --version 3.4.3
NuGet\Install-Package OfficeIMO.Invoicing.Validation -Version 3.4.3
<PackageReference Include="OfficeIMO.Invoicing.Validation" Version="3.4.3" />
<PackageVersion Include="OfficeIMO.Invoicing.Validation" Version="3.4.3" />
<PackageReference Include="OfficeIMO.Invoicing.Validation" />
paket add OfficeIMO.Invoicing.Validation --version 3.4.3
#r "nuget: OfficeIMO.Invoicing.Validation, 3.4.3"
#:package OfficeIMO.Invoicing.Validation@3.4.3
#addin nuget:?package=OfficeIMO.Invoicing.Validation&version=3.4.3
#tool nuget:?package=OfficeIMO.Invoicing.Validation&version=3.4.3
OfficeIMO.Invoicing.Validation
Validate exact CII or UBL invoice bytes against an explicit schema and business-rule release. The package runs on .NET 8 and .NET 10. It makes no network requests.
Build and install locally
From the repository root, pack both projects, then add the validation package to your application. NuGet resolves its invoice-model dependency from the same feed:
dotnet pack OfficeIMO.Invoicing/OfficeIMO.Invoicing.csproj -c Release -o artifacts/invoice-feed
dotnet pack OfficeIMO.Invoicing.Validation/OfficeIMO.Invoicing.Validation.csproj -c Release -o artifacts/invoice-feed
dotnet add path/to/Application.csproj package OfficeIMO.Invoicing.Validation --source artifacts/invoice-feed
PDF generation is independent of this package. Java and Saxon are required only when running the configured business-rule stage.
Validate invoice XML
The configured stages are:
| Release | Syntax | Schema and rules |
|---|---|---|
| EN 16931 1.3.16 | CII or UBL | D16B CII / UBL 2.1 XSD and EN 16931 Schematron |
| XRechnung 3.0.2, configuration 2026-08-31 | CII or UBL | XSD, EN 16931, XRechnung and the configuration's severity overrides |
| Peppol BIS Billing 3.0.21 | UBL | UBL 2.1 XSD, EN 16931 and May 2026 Peppol rules |
Download the official KoSIT rule archive
and extract the official SaxonJ-HE 12.10 distribution
to a local tools directory. Keep Saxon's lib directory next to its main JAR and
provide a Java runtime. These external artifacts retain their upstream licenses;
OfficeIMO does not redistribute the authority rules or Java runtime.
The runner verifies the main JAR and its xmlresolver-5.3.3.jar,
xmlresolver-5.3.3-data.jar and jline-2.14.6.jar companions at construction and
before execution. Each invocation runs from a private copy of those verified
bytes, excluding installation-directory aliases and loose classes. Reports
identify all four JAR hashes. The configured Java executable remains supplied
and managed by the caller.
using OfficeIMO.Invoicing.Validation;
var bundle = InvoiceRuleBundle.Load("xrechnung-3.0.2-validator-configuration-2026-08-31.zip");
var runner = new SaxonInvoiceRulesRunner("tools/saxon/saxon-he-12.10.jar");
var validator = new InvoiceValidator(bundle, runner);
var report = await validator.ValidateAsync(
File.ReadAllBytes("invoice.xml"),
InvoiceRulesRelease.XRechnung_3_0_2_2026_08_31);
Console.WriteLine($"{report.IsValid}: {report.Sha256}");
foreach (var diagnostic in report.Diagnostics)
Console.WriteLine($"{diagnostic.Code}: {diagnostic.Message}");
For Peppol, also supply the official
3.0.21 Schematron source
as the second argument to InvoiceRuleBundle.Load. The source is verified by
SHA-256 and compiled locally with the included MIT-licensed Schematron compiler.
The Peppol download names an immutable official source commit; a changed artifact is rejected by its pinned hash.
IsValid is true only when both XSD and business rules passed. Without a runner,
business rules are NotRun. Engine failures are Failed, and content failures
are Invalid. Reports include exact input length, SHA-256, release, authority
artifact hashes and runner identity. Revalidate after any edit to the XML.
Runner identity is recorded after an invoice-rule process starts, including when
that process fails. Startup failures and compiler-only executions leave it empty.
Reports contain at most 999 detailed diagnostics plus a summary of excess
diagnostics with their highest severity, preserving the
distinction between invalid invoice content and a failed validator.
The pinned EN 16931 artifacts differ for zero-rated IGIC (category L): CII
rules BR-AF-05/06/07 require a positive rate, while the UBL rules permit zero.
The semantic model accepts a non-negative IGIC rate; the standards report exposes
the selected syntax's rule result. A zero-rate CII invoice therefore cannot receive
a passing report from this pinned release.
This validates XML. Factur-X/ZUGFeRD PDF/A, XMP, attachment relationships and visible invoice content require the separate PDF artifact checks. This package does not certify delivery over the Peppol network or the legality of a transaction.
Each rule-engine invocation uses a separate temporary workspace. On Unix, its permissions restrict access to the current user before invoice content is written. The workspace is removed after completion, failure, cancellation, or timeout.
Run the standards checks
With Java and the .NET 10 SDK available, run:
./Build/Test-InvoicingStandards.ps1
The command downloads hash-pinned authority artifacts and Saxon into
artifacts/invoicing-standards, then validates generated documents and
independent fixtures. -OutputPath selects a different local artifact directory;
-JavaExecutable selects an existing Java installation. The artifacts remain
there for reuse and inspection.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- OfficeIMO.Invoicing (>= 3.4.3)
-
net8.0
- OfficeIMO.Invoicing (>= 3.4.3)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on OfficeIMO.Invoicing.Validation:
| Package | Downloads |
|---|---|
|
OfficeIMO.Workflows
Typed local document workflows that compose first-party OfficeIMO conversion, PDF, and provenance capabilities. |
|
|
OfficeIMO.Invoicing.KSeF
KSeF v2 token authentication, encrypted online invoice submission, status and UPO retrieval. |
GitHub repositories
This package is not used by any popular GitHub repositories.