Skip to content

Added new test suites in emaail validation of the format.json file of…#869

Open
sahajsrivastava044-spec wants to merge 2 commits intojson-schema-org:mainfrom
sahajsrivastava044-spec:email-format-validation
Open

Added new test suites in emaail validation of the format.json file of…#869
sahajsrivastava044-spec wants to merge 2 commits intojson-schema-org:mainfrom
sahajsrivastava044-spec:email-format-validation

Conversation

@sahajsrivastava044-spec
Copy link

@sahajsrivastava044-spec sahajsrivastava044-spec commented Mar 8, 2026

  • Added new edge cases in /tests/draft3/format.json under the "email format" section.
  • These cases cover scenarios such as double dots in domains, missing domains, spaces in addresses, and unwanted special symbols.
  • Verified that the new cases integrate correctly with the existing suite.

Additionally:

  • Created Python scripts (run_suite.py and strict_email_validator.py) to test both spec-compliant and stricter email validation.
  • These scripts are gitignored and provided only for local testing, not part of the suite itself.
  • The strict validator demonstrates how real-world email validation can differ from the spec, highlighting potential areas for discussion.

This contribution ensures the test suite better reflects problematic email cases, while keeping spec compliance clear.

… the draft3 in test file along python enviroment variables.
@sahajsrivastava044-spec sahajsrivastava044-spec requested a review from a team as a code owner March 8, 2026 07:02
"data": null,
"valid": true
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unintended change?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this file being edited?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this file being edited?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this file being edited?

@jviotti
Copy link
Member

jviotti commented Mar 9, 2026

Please don't add any implementation setup in this repo. It is supposed to be an implementation agnostic test suite.

},
{
"description": "Invalid email with no spec interpretation",
"data": "user@localhost",
Copy link
Member

@jviotti jviotti Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is invalid as per the RFC

},
{
"description": "Invalid email with unwanted special symbols",
"data": "user//@example.com",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is valid as per the RFC too

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

Successfully merging this pull request may close these issues.

2 participants