--ctx controls whether fields within a record share locale and identity. Name, email, phone, and gov IDs become coherent — one person, one country.
- Modes — strict, loose, off
- Identity fields — which fields share identity
- Gov-ID dispatch — locale-aware documents
- In config files
- Examples
All fields in a record use one locale and one identity.
seedfaker name email phone --locale en,de --ctx strict -n 3 --seed demo| Field | Without ctx | With --ctx strict |
|---|---|---|
| name | random locale | record locale |
| random locale, random name | derived from record name | |
| phone | random country code | record country code |
| address | random country | record country |
| ssn | always US SSN | locale-appropriate ID |
| passport | random country | record country format |
| drivers-license | always US | record country format |
| national-id | locale-dispatched | record locale |
| username | random | derived from record name |
70% of records lock to one locale. 30% draw from the full locale pool. Identity correlation still applies.
Each field independently selects from all configured locales. Name and email are unrelated.
These fields share a single name when context is active:
name, first-name, last-name, email, username, login-name, social-handle
Email and username are derived from the shared name.
ssn and national-id dispatch by locale:
| Locale | ssn / national-id |
|---|---|
| en, en-gb, en-ca, ... | US SSN (123-45-6789) |
| de | Steuer-ID (12345678901) |
| fr | NIR (1 85 12 75 123 456) |
| it | Codice Fiscale |
| es | DNI |
| ja | My Number (12 digits) |
| zh | Shenfenzheng (18 chars) |
| pt-br | CPF |
| ru | INN |
| ... | see national-id source |
For details on how seed, locale, and context affect output, see determinism.
options:
ctx: strict
locale: [en, de, fr]See examples/context/ for output across all 68 locales with --ctx strict.
Regenerate: make field-examples.
- Library usage — ctx:strict in Python/Node.js
- Training and evaluation datasets — locale-correlated identities for training sets