Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"format": "idn-email" allows empty string #295

Open
davidimagitech opened this issue May 27, 2022 · 2 comments
Open

"format": "idn-email" allows empty string #295

davidimagitech opened this issue May 27, 2022 · 2 comments

Comments

@davidimagitech
Copy link

I came across the following validation error for an empty string value after updating a field's format from email to idn-email:

"JSON is valid against more than one schema from 'oneOf'. Valid schema indexes: 0, 1."

Schema:
{ "properties": { "email": { "oneOf": [{ "format": "idn-email" }, { "const": "" } ] } }, "required": ["email"] }

Test input:
{ "email": "" }

...which means that "format": "idn-email" is accepting an empty string as an email address

@davidimagitech
Copy link
Author

On further checking, it appears as if "format": "idn-email" accepts any string, including empty string, on https://www.jsonschemavalidator.net/

@JamesNK
Copy link
Owner

JamesNK commented Jun 7, 2022

Unfortunately the idn-email format isn't supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants