Validation rule reference
Every rule SAFTCheck applies to your SAF-T (PT) XML, in plain language. Each page covers what AT expects, the most common ways the rule fails, and how to fix it.
encoding.declaration
XML encoding declaration (Windows-1252)
AT requires Windows-1252 encoding. UTF-8 declarations are silently rejected.
encoding.bom
Byte Order Mark (BOM) at file start
AT rejects SAF-T files that start with a UTF-8 or UTF-16 BOM.
nif.mod11
Portuguese NIF — Mod-11 algorithm and prefixes
9-digit Portuguese tax ID; check digit computed via Mod-11 with weights 9..2.
atcud.format
ATCUD format — VALIDATION-SEQUENCE since 2023
Mandatory unique-document code: 8 uppercase alphanumeric chars, dash, sequence ≥ 1.
header.dates
Header dates — StartDate, EndDate, FiscalYear, DateCreated
Time-window invariants AT enforces on the SAF-T Header block.
feature.inline-editor
Inline editor — fix NIF, ATCUD and header dates in place
Edit the offending value next to the finding, re-validate immediately, no ERP round-trip needed.
nif.vies
VIES cross-check — NIF registered in EU VAT exchange
Header NIF is verified against the EU VIES service and the registered name is compared with the SAF-T CompanyName.
Looking for narrative deep dives instead? See the blog for end-to-end fix walkthroughs.