Validation
Validation runs in the browser after mapping.
| Type | Behavior |
|---|---|
| Empty cell | null. Error if required. |
| string | Trimmed string; internal whitespace collapsed. |
| boolean | true/false, yes/no, y/n, 1/0, on/off. Stored as a boolean. |
| url | http or https. Bare www.example.com is stored with https://. |
| number | Currency, thousands separators, percentages as fractions (50% → 0.5), and EU decimals. Locale via numberLocale (us | eu | auto). |
Simple email regex; strips mailto: and Name <addr>; stored lowercased. | |
| date | Normalized to YYYY-MM-DD. Slash, dash, and dotted numeric dates (15.03.2024) follow dateOrder (MDY default, or DMY). A day or month above 12 is unambiguous and does not require dateOrder. |
| enum | Case-insensitive match against enumValues; returns the canonical allowed value. Optional field valueMap remaps aliases first. Remaining unknown values can be mapped on preview (or left invalid). |
Unmapped fields behave like empty cells.
Optional transform(raw) runs after trim and before type coercion. Optional validate(value, row) runs after coercion (sync). Return a message to fail the cell, or null to pass. row is the coerced object, so one field can check another (for example seats vs plan). Name those siblings in dependsOn for agents; revalidation is always whole-row. Functions are local schema only.
Field-level unique and component duplicateKey both flag in-file duplicates. Multi-sheet Excel workbooks expose a sheet picker on the map step. Title rows above the real headers can be skipped with the header-row picker. Pass dir="rtl" for right-to-left layouts.
Related: Fields · Duplicates · Errors · Validate before insert guide