Skip to content

More test cases for email format according to RFC-5321 section 4.1.2. #466

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions tests/draft2019-09/optional/format/email.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,26 @@
"data": "[email protected]",
"valid": true
},
{
"description": "a quoted string with a space in the local part is valid",
"data": "\"joe bloggs\"@example.com",
"valid": true
},
{
"description": "a quoted string with a double dot in the local part is valid",
"data": "\"joe..bloggs\"@example.com",
"valid": true
},
{
"description": "an IPv4-address-literal after the @ is valid",
"data": "joe.bloggs@[127.0.0.1]",
"valid": true
},
{
"description": "an IPv6-address-literal after the @ is valid",
"data": "joe.bloggs@[IPv6:::1]",
"valid": true
},
{
"description": "dot before local part is not valid",
"data": "[email protected]",
Expand All @@ -47,6 +67,16 @@
"description": "two subsequent dots inside local part are not valid",
"data": "[email protected]",
"valid": false
},
{
"description": "an invalid domain",
"data": "joe.bloggs@invalid=domain.com",
"valid": false
},
{
"description": "an invalid IPv4-address-literal",
"data": "joe.bloggs@[127.0.0.300]",
"valid": false
}
]
}
Expand Down