python-jsonschema / jsonschema

An implementation of the JSON Schema specification for Python

Home Page:https://python-jsonschema.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"email" format validation is too relaxed

trzejos opened this issue · comments

The validator only checks that "@" is in the input string, rather than one of the specifications for the "email" or "idn-email" formats.

https://github.com/python-jsonschema/jsonschema/blob/v4.23.0/jsonschema/_format.py#L238

https://json-schema.org/understanding-json-schema/reference/string#email-addresses

This is intentional behavior, documented here and customizable if you have different needs.