What the error means
The type keyword checks that a value is a string; the format keyword checks what the string looks like. JSON Schema defines a set of named formats — email, uri, date, date-time, time, uuid, ipv4, ipv6, hostname, regex, and others — each with a precise syntax borrowed from an RFC. must match format "email" is Ajv's report that a string is well-typed but does not satisfy the named format, with instancePath pointing at the property.
The example fails twice: ada.example.com has no @, so it is not an email address, and 2026-09-13 is a date, not a date-time, which requires a time and a timezone offset (2026-09-13T10:00:00Z).
Why it happens
- The value is genuinely malformed — a missing
@, a URL without a scheme, a UUID with the wrong group lengths. - The wrong format was chosen.
dateversusdate-timeis the classic pair;timeanddurationare others. Each is exact and none accepts the others' syntax. - The data uses a looser convention than the RFC. Dates like
13/09/2026, emails with display names (Ada <ada@example.com>), or URIs with spaces are all rejected. - A format the validator does not know. Custom names such as
phoneorslugare not standard; whether they fail or are ignored depends on the validator's strictness setting. - Format validation was previously off. In draft 2019-09 and later,
formatis an annotation by default and only asserts when the validator is configured to; a validator upgrade that turns assertion on surfaces long-standing bad data.
How to fix it
- Paste the schema and data into the validator above. Each failing property is listed with its path and the format it missed.
- If the value is wrong, correct it at the source: add the
@, produce a fulldate-timefrom the timestamp rather than a bare date. - If the format is wrong, change the schema keyword to the one that matches the data —
datefor2026-09-13. - If the constraint is not wanted, remove
format; keeptype: "string"so the value is still checked for being text. For a custom shape, usepatternwith a regular expression instead, and test it with Regex Tester.
Data that satisfies the example schema:
{ "email": "ada@example.com", "createdAt": "2026-09-13T10:00:00Z" }
If it still fails
- Ajv needs the
ajv-formatsplugin to know the standard formats; without it,formatis either ignored or an error in strict mode, depending on configuration. The validator above includes it. emailvalidation in "fast" mode accepts some addresses that stricter checks reject, and vice versa; do not rely on the keyword as the sole gate for anything security-sensitive.- JSON to JSON Schema infers
formatfor values that already look like emails, URIs, and timestamps in the sample, which is a good way to see which formats your data actually matches.
Related errors
must have required property
Add the missing key to the document, or remove it from the schema's required array if it is genuinely optional; the error names the property and the object path.
Input should be a valid integer
Match the annotation to the data: float for fractional values, str for codes, Optional[int] = None for nulls; use a validator or strict=False only when coercion is intended.