Debian Codegraph @

share/tests/draft2020-12/optional/format/idn-email.json

raw
1 [
2 {
3 "description": "validation of an internationalized e-mail addresses",
4 "schema": {
5 "$schema": "https://json-schema.org/draft/2020-12/schema",
6 "format": "idn-email"
7 },
8 "tests": [
9 {
10 "description": "all string formats ignore integers",
11 "data": 12,
12 "valid": true
13 },
14 {
15 "description": "all string formats ignore floats",
16 "data": 13.7,
17 "valid": true
18 },
19 {
20 "description": "all string formats ignore objects",
21 "data": {},
22 "valid": true
23 },
24 {
25 "description": "all string formats ignore arrays",
26 "data": [],
27 "valid": true
28 },
29 {
30 "description": "all string formats ignore booleans",
31 "data": false,
32 "valid": true
33 },
34 {
35 "description": "all string formats ignore nulls",
36 "data": null,
37 "valid": true
38 },
39 {
40 "description": "a valid idn e-mail ([email protected] in Hangul)",
41 "data": "실례@실례.테스트",
42 "valid": true
43 },
44 {
45 "description": "an invalid e-mail/idn e-mail address",
46 "data": "2962",
47 "valid": false
48 },
49 {
50 "description": "a valid e-mail address",
51 "data": "[email protected]",
52 "valid": true
53 },
54 {
55 "description": "a non-ASCII local part with an ASCII domain is valid",
56 "data": "δοκιμή@example.com",
57 "valid": true
58 },
59 {
60 "description": "a non-ASCII quoted local part is valid",
61 "data": "\"δοκιμή\"@example.com",
62 "valid": true
63 },
64 {
65 "description": "a domain label that is not in Unicode NFC is valid",
66 "data": "user@cafe\u0301.com",
67 "valid": true
68 },
69 {
70 "description": "a local part that is not in Unicode NFC is valid",
71 "data": "cafe\[email protected]",
72 "valid": true
73 },
74 {
75 "description": "a C1 control in the local part is valid",
76 "comment": "https://www.rfc-editor.org/rfc/rfc6531#section-3.3 atext =/ UTF8-non-ascii; https://www.rfc-editor.org/rfc/rfc3629#section-4 UTF8-2 admits U+0085",
77 "data": "\[email protected]",
78 "valid": true
79 },
80 {
81 "description": "a noncharacter in the local part is valid",
82 "comment": "https://www.rfc-editor.org/rfc/rfc6531#section-3.3 atext =/ UTF8-non-ascii; https://www.rfc-editor.org/rfc/rfc3629#section-4 UTF8-3 admits U+FFFF",
83 "data": "\[email protected]",
84 "valid": true
85 },
86 {
87 "description": "a local part at the 64-octet limit is valid",
88 "comment": "https://www.rfc-editor.org/rfc/rfc5321#section-4.5.3.1 every implementation must be able to receive a local part of 64 octets",
89 "data": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@example.com",
90 "valid": true
91 },
92 {
93 "description": "a fullwidth commercial at is not a local-part separator",
94 "comment": "https://www.rfc-editor.org/rfc/rfc5321#section-4.1.2 Mailbox = Local-part \"@\" ( Domain / address-literal ) splits on U+0040, and any IDN mapping applies only to the domain that split produces, so U+FF20 cannot become the delimiter",
95 "data": "user\uff20example.com",
96 "valid": false
97 },
98 {
99 "description": "a local part with a supplementary-plane character is valid",
100 "comment": "https://www.rfc-editor.org/rfc/rfc6531#section-3.3 atext =/ UTF8-non-ascii, and https://www.rfc-editor.org/rfc/rfc3629#section-4 UTF8-4 covers U+10000 and above",
101 "data": "\ud835\[email protected]",
102 "valid": true
103 }
104 ]
105 }
106 ]