Formula
Missing required columns = required list − header row (case-insensitive, trimmed). Rows checked = data rows after the header.
Per-cell checks: blank required value; non-numeric value in a numeric column (funded, factor, balance, days_past_due, amount, rate, revenue, after stripping $ and commas); factor outside 1.00–2.50; negative funded, balance or amount; negative days_past_due; state not two letters.
Per-row check: cell count equals header count. Per-file check: each id appears once. Validation result = Passed only if there are no missing columns and no issues; Rows with issues counts distinct line numbers (duplicate-id issues are file-level and count as one).
Worked examples
Example 1: the sample file (five rows, five issues)
Required columns: id, funded, factor, balance, days_past_due, state. The header has all six, so missing columns is None. Line 2 (id 1001) is clean. Line 3 (id 1002) has an empty balance cell: balance is required, so the tool records Blank required value; the numeric check is skipped for empty cells, so there is no second issue. Line 4 (id 1003) has funded = eighty: the numeric check records Not a number: eighty; because the value is not a number the negative-amount check does not fire. Line 5 has id 1001 again and factor 0.9: the factor check records Factor 0.9 outside 1.00–2.50, and the duplicate is noted at the end. Line 6 (id 1005) has days_past_due of −3: Negative days past due. After all rows, the id map shows 1001 twice, recorded as Duplicate id 1001 appears 2 times with the line shown as a dash. Totals: rows checked 5; issues found 5; rows with issues 5 (lines 3, 4, 5, 6 and the dash); result Failed. The issues table lists each with its line and column, and the download is the same list as CSV so the fixes can be assigned.
Example 2: a clean file that still fails on a missing column
Change the required columns to id, funded, factor, balance, days_past_due, state, revenue and paste a file whose header is id,funded,factor,balance,days_past_due,state with five clean rows. The header lacks revenue, so missing required columns shows revenue and the result is Failed even though issues found is 0 and rows with issues is 0. The tool treats a missing column as fatal because the downstream import would either reject the file or silently fill the column with blanks. The fix is in the export, not the file: add the column to the query. If the column is genuinely optional for this import, remove it from the required list; the list is the contract between the exporting system and the importing one, and this is where to state it.
Example 3: an unquoted dollar amount and a spelled-out state
Paste a file whose line 2 is 1001,$50,000,1.30,21000,0,New York. The CSV parser splits on commas outside quotes, so $50,000 becomes two cells, $50 and 000, and the row has seven cells against a six-column header. The tool records a structure issue, Expected 6 cells, found 7, and then checks each column by position: funded is now $50, which parses as 50 after stripping the dollar sign and passes; factor is 000, which parses as 0 and is outside 1.00–2.50; balance is 1.30; days_past_due is 21000; state is 0, which fails the two-letter test; the final cell, New York, has no header and is ignored. One formatting error produced four issues on the line. Quote the amount ("$50,000") or export without separators, and use the two-letter postal code. The lesson is that the first issue on a line is often the cause and the rest are symptoms; fix structure issues first and re-run.