Comment by speleding
ledger can validate that all account names are pre-defined, are formatted in a specific way with regard to decimal and thousands separator, their currency specified and a few more things. (None of these are enforced by default, but for any serious use of ledger you would want to set `--strict` in your .ledgerrc file)
What else would you want ledger to enforce? We actually have a few very specific (to us) rules we enforce, but we do that via a ruby script. That's the power of plain text accounting: you can just whip up a small script to do validation for you.