Skip to content
Free to use · LivePersonal project

ECF XML Validator

A developer tool for validating Dominican Republic e-CF invoice XML against official DGII XSD schemas. It highlights every issue in context — breaking errors, math discrepancies, conditional warnings, informational notes and advisory hints — with human-readable messages instead of the vague feedback DGII gives you. Validation runs in your browser — the XML itself is never uploaded.

14
DGII document formats
60+
Business rules
5
Severity levels
62
Automated tests
The problem

DGII tells you something is wrong. That's usually all it tells you.

Nine times out of ten, the most you get from DGII is a field name and a generic error code — no indication of what the correct value should be, no hint at why your structure is wrong, no explanation of which conditional rule you violated. During the certification process you get slightly more context, but it's still limited and cryptic.

Developers end up debugging invoices blind: resubmitting, getting the same error, changing one field at a time, burning limited government-issued NCF sequences in the process.

What DGII says

"Campo RNCComprador invalido."

What you need to know

RNCComprador is required for all E-31 invoices. Your buyer must have a valid RNC (or cedula). The field cannot be omitted even if the buyer name is present.

Interface

What it looks like

A simplified demo of the real interface. Click any issue to jump to its line — and back. Try it with your own XML ↗

ECF XML ValidatorInteractive demo
E-31 · Factura de Crédito Fiscal · pre-firma
Highlighting

Six states, immediately readable

Breaking error

DGII will reject — missing required fields, invalid RNC, wrong field names, schema violations.

Math discrepancy

Recalculated line totals, ITBIS or MontoTotal don't match the declared amounts.

Conditional warning

Invoice passes as Aceptado Condicional — phone too long, address over character limit.

Informational

Not an error — signature absent, unusual date gap, or a deprecated field in use.

Advisory

Doesn't affect validity — context worth knowing, like hints from the emitter's registered business activity. Shown in its own lane.

All clear

No issues found — the entire XML highlights in green.

Coverage

What it checks.

Everything below is live today.

Schema & structure
  • Official DGII XSD validation for all 10 e-CF types, the RFCE summary, and the ARECF / ACECF / ANECF response documents
  • Element order checked against the schema sequence; required and forbidden fields per document type
  • Document type detected automatically, and packed XML is beautified before display
Identity & sequences
  • RNC and cédula check digits, plus a live DGII registry lookup (active status, electronic-invoicer registration)
  • eNCF prefix ↔ TipoeCF consistency
  • Province and municipality codes checked against DGII tables
Math
  • Per-line arithmetic (quantity × price) and header totals recalculated
  • ITBIS rates, additional taxes (ISC) and MontoTotal compared with the declared amounts
  • Export totals for E-46 and foreign-currency (OtraMoneda) conversions and cross-rates
Business rules, dates & signature
  • 60+ DGII business rules: required-if fields and sections forbidden by invoice type
  • GMT-4 date handling, with a hint when a future FechaHoraFirma points to a UTC mix-up
  • Structural digital-signature check (well-formed, non-empty), without claiming cryptographic validity
  • Advisory hints based on the emitter’s registered economic activity
Working with results
  • Click any issue to jump to its line, and back
  • Filter by severity, with a built-in legend
  • Copy the issue list or export it as JSON, sorted by severity
Next up
  • Cryptographic signature verification — not just structure
  • Batch mode for validating many XMLs at once
Source code

Free to use. Free to read.

The validator is a Next.js app written in TypeScript. Rules are organized by category — format, math, conditional fields, sequences, registry — and a Vitest suite runs valid and deliberately broken XML fixtures against the engine.

The source is available under the PolyForm Noncommercial 1.0.0 license: free to read, study, and modify for noncommercial use. The hosted tool is free for everyone, including businesses.