Debian Codegraph @

share/tests/draft2019-09/optional/format/email.json

raw
1 [
2 {
3 "description": "validation of e-mail addresses",
4 "schema": {
5 "$schema": "https://json-schema.org/draft/2019-09/schema",
6 "format": "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 e-mail address",
41 "data": "[email protected]",
42 "valid": true
43 },
44 {
45 "description": "an invalid e-mail address",
46 "data": "2962",
47 "valid": false
48 },
49 {
50 "description": "tilde in local part is valid",
51 "data": "[email protected]",
52 "valid": true
53 },
54 {
55 "description": "tilde before local part is valid",
56 "data": "[email protected]",
57 "valid": true
58 },
59 {
60 "description": "tilde after local part is valid",
61 "data": "[email protected]",
62 "valid": true
63 },
64 {
65 "description": "dot before local part is not valid",
66 "data": "[email protected]",
67 "valid": false
68 },
69 {
70 "description": "dot after local part is not valid",
71 "data": "[email protected]",
72 "valid": false
73 },
74 {
75 "description": "two separated dots inside local part are valid",
76 "data": "[email protected]",
77 "valid": true
78 },
79 {
80 "description": "two subsequent dots inside local part are not valid",
81 "data": "[email protected]",
82 "valid": false
83 },
84 {
85 "description": "two email addresses is not valid",
86 "data": "[email protected], [email protected]",
87 "valid": false
88 },
89 {
90 "description": "full \"From\" header is invalid",
91 "data": "\"Winston Smith\" <[email protected]> (Records Department)",
92 "valid": false
93 }
94 ]
95 }
96 ]