AnyTool
Your files never leave your device. All processing happens locally in your browser.

How do I build validation rules and test them against a CSV?

In AnyTool's Data Import Validation Rules Builder you define per-column rules — required, email, number, integer, min/max length, regex, numeric range, allowed-values enum, unique, date, URL, UUID — and test them live against pasted CSV data. It returns a count of violations and bad rows, a per-violation list (row, field, rule, offending value), and surfaces broken rules (like an invalid regex) instead of silently passing. Export the violations or split the data into clean and failing rows. Everything runs in your browser — nothing is uploaded.

  • Many rule types: required, type, range, regex, enum, unique, email/URL/date/UUID
  • Live per-violation report (row, field, rule, value)
  • Surfaces invalid rules instead of silently passing
  • Export violations or clean/failing rows — 100% in your browser

What is

Data validation rules

Data validation rules are per-column constraints — type, format, range, pattern, allowed values, uniqueness, required — that a dataset must satisfy before it is accepted. A rules builder lets users define these constraints and test data against them, reporting each violation. Client-side rule testing does this in the browser without uploading the data.

File Tools

Related terms

data validationconstraintsschemaregexdata quality

How to Build and Test Data Validation Rules

Define per-column rules and test them against CSV in your browser.

30 secWeb browser
  1. 1

    Paste CSV

    Paste your data with a header row.

  2. 2

    Add rules

    Add per-column rules (type, range, regex, enum, unique, …). Testing runs live.

  3. 3

    Export

    Download the violations report or the clean/failing rows — nothing is uploaded.

Result: A violation report and clean/failing row exports

Frequently Asked Questions

Required, email, number, integer, min/max length, regex, numeric range, enum, unique, date, URL and UUID.

Range supports negative bounds, enum can be case-sensitive, and you can allow or forbid empty values per rule.

The tool reports it as a rule error rather than silently passing every row.

That avoids the common bug where a malformed pattern makes a validator appear to find no problems.

No — rule testing runs entirely in your browser.

You can export the violation report or the clean and failing rows without your data leaving the device.

Detailed Explanation

Methodology

How the Data Validation Rules Builder Works

AnyTool tests user-defined rules against a CSV entirely in the browser. The file is parsed with PapaParse, then for each rule you define on a column — required, email, number, integer, min/max length, regex, numeric range, allowed-values enum, unique, date, URL or UUID — every row is checked. Numbers are parsed locale-aware and dates with a deterministic UTC parser; ranges support negative bounds via explicit min/max; enums honour case-sensitivity; regexes are compiled once and a malformed pattern is reported as a rule error instead of silently passing; unique uses a per-column set; and a rule whose field is not found is surfaced as unmatched rather than ignored. The result is a per-violation list (row, field, rule, value), counts of violations and bad rows, and per-field/per-rule breakdowns. Export the violations or split into clean and failing rows. Nothing is uploaded.

  • Runs client-side — the data is never uploaded
  • Rule types: required, type, range, regex, enum, unique, email/URL/date/UUID
  • Negative range bounds; case-sensitive enums; compiled regex
  • Invalid rules + unmatched fields surfaced (not silently passed)
  • Per-violation report; clean/failing row export
  • No CDN, no backend, no row cap
Privacy & Security

Privacy vs Server-based Validators

Schema and rule-based CSV validators often run on a server or require an account. AnyTool compiles and tests your rules locally, so the data never leaves the browser, there is no row cap, and it works offline after first load — and because broken rules and unmatched fields are surfaced explicitly, the results are trustworthy rather than misleadingly clean.

Rule-based validation: AnyTool vs typical validators
CapabilityAnyToolTypical validators
Data handlingIn your browserOften uploaded
Rule types12+ incl. unique/range/regexVaries
Invalid-rule handlingReportedOften silent pass
Row limitNoneOften capped
ExportViolations + clean/failingVaries

AnyTool is a privacy-first client-side rules builder — rules are tested locally and nothing is uploaded.