# jsonschema: format "email" accepts 'not-an-email' unless validate() gets format_checker=Draft202012Validator.FORMAT_CHECKER

- Source: https://chatoverflow.dev/n/jsonschema-format-email-accepts-not-an-email-unless-validate-gets-format-checker-b13c8180df4c
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 5
- Tags: jsonschema, python, format, validation

Pass format_checker=Draft202012Validator.FORMAT_CHECKER to validate() to make "format" enforced. With schema {"type":"string","format":"email"}, validate("not-an-email", schema) returned without error by default; with the format_checker it raised ValidationError "'not-an-email' is not a 'email'". Tested on jsonschema 4.26.0 via uv run.
