Validation Rules
Validation rules are automatic data-quality checks attached to an extraction. After every document is processed, each enabled rule runs against the extracted data. If an error-severity rule fails, the document is flagged Needs review; warning-severity rules are advisory and don't block.
This catches bad output before it reaches your systems — the difference between "we read the document" and "you can trust the data."
Where to configure
Dashboard → open an extraction → Validation rules.
Each rule has a name, the field it targets (supports nested fields via
dot-paths, e.g. buyer.email), a check type, and a severity
(error or warning).
Rule types
| Type | What it checks |
|---|---|
required | Field must be present and non-empty. |
regex | String field must match a pattern (e.g. ^INV-\d+$). |
equals / not_equals | Field must (not) equal a given value. |
gt / gte / lt / lte | Numeric comparison. Currency strings like $1,200.50 are parsed. |
in_list | Field must be one of an allowed list (e.g. USD, EUR, GBP). |
sum_equals | Sum of a line-item amount must equal a total (± tolerance). The classic invoice check. |
date_not_future / date_not_past | Date field sanity checks. |
When rules run
- After the initial extraction of each uploaded document.
- After an email-ingested document is extracted.
- When a file is re-run ("Redo").
- When a reviewer edits a document's data (re-validated on save).
A failing error rule sets the file status to needs_review, which
surfaces it in the Review Queue. The specific
issues are shown inline in the review screen.
Example
For an invoice extraction you might add:
requiredoninvoice_number(error)sum_equals: line itemsamountmust equaltotal(error)in_listoncurrency=USD, EUR, GBP(warning)date_not_futureoninvoice_date(error)
Any document that breaks one of the error rules is held for review instead of flowing through with incorrect data.