github.com/kaptinlin/jsonschema@v0.4.6/testdata/JSON-Schema-Test-Suite/tests/draft-next/optional/format/email.json (about) 1 [ 2 { 3 "description": "validation of e-mail addresses", 4 "schema": { 5 "$schema": "https://json-schema.org/draft/next/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": "joe.bloggs@example.com", 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": "te~st@example.com", 52 "valid": true 53 }, 54 { 55 "description": "tilde before local part is valid", 56 "data": "~test@example.com", 57 "valid": true 58 }, 59 { 60 "description": "tilde after local part is valid", 61 "data": "test~@example.com", 62 "valid": true 63 }, 64 { 65 "description": "a quoted string with a space in the local part is valid", 66 "data": "\"joe bloggs\"@example.com", 67 "valid": true 68 }, 69 { 70 "description": "a quoted string with a double dot in the local part is valid", 71 "data": "\"joe..bloggs\"@example.com", 72 "valid": true 73 }, 74 { 75 "description": "a quoted string with a @ in the local part is valid", 76 "data": "\"joe@bloggs\"@example.com", 77 "valid": true 78 }, 79 { 80 "description": "an IPv4-address-literal after the @ is valid", 81 "data": "joe.bloggs@[127.0.0.1]", 82 "valid": true 83 }, 84 { 85 "description": "an IPv6-address-literal after the @ is valid", 86 "data": "joe.bloggs@[IPv6:::1]", 87 "valid": true 88 }, 89 { 90 "description": "dot before local part is not valid", 91 "data": ".test@example.com", 92 "valid": false 93 }, 94 { 95 "description": "dot after local part is not valid", 96 "data": "test.@example.com", 97 "valid": false 98 }, 99 { 100 "description": "two separated dots inside local part are valid", 101 "data": "te.s.t@example.com", 102 "valid": true 103 }, 104 { 105 "description": "two subsequent dots inside local part are not valid", 106 "data": "te..st@example.com", 107 "valid": false 108 }, 109 { 110 "description": "an invalid domain", 111 "data": "joe.bloggs@invalid=domain.com", 112 "valid": false 113 }, 114 { 115 "description": "an invalid IPv4-address-literal", 116 "data": "joe.bloggs@[127.0.0.300]", 117 "valid": false 118 } 119 ] 120 } 121 ]