summaryrefslogtreecommitdiff
path: root/json/tests/draft2020-12/optional/format/idn-email.json
diff options
context:
space:
mode:
Diffstat (limited to 'json/tests/draft2020-12/optional/format/idn-email.json')
-rw-r--r--json/tests/draft2020-12/optional/format/idn-email.json61
1 files changed, 61 insertions, 0 deletions
diff --git a/json/tests/draft2020-12/optional/format/idn-email.json b/json/tests/draft2020-12/optional/format/idn-email.json
new file mode 100644
index 0000000..50f3c23
--- /dev/null
+++ b/json/tests/draft2020-12/optional/format/idn-email.json
@@ -0,0 +1,61 @@
+[
+ {
+ "description": "validation of an internationalized e-mail addresses",
+ "schema": {
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "format": "idn-email"
+ },
+ "tests": [
+ {
+ "description": "all string formats ignore integers",
+ "data": 12,
+ "valid": true
+ },
+ {
+ "description": "all string formats ignore floats",
+ "data": 13.7,
+ "valid": true
+ },
+ {
+ "description": "all string formats ignore objects",
+ "data": {},
+ "valid": true
+ },
+ {
+ "description": "all string formats ignore arrays",
+ "data": [],
+ "valid": true
+ },
+ {
+ "description": "all string formats ignore booleans",
+ "data": false,
+ "valid": true
+ },
+ {
+ "description": "all string formats ignore nulls",
+ "data": null,
+ "valid": true
+ },
+ {
+ "description": "a valid idn e-mail (example@example.test in Hangul)",
+ "data": "실례@실례.테스트",
+ "valid": true
+ },
+ {
+ "description": "an invalid idn e-mail address",
+ "data": "2962",
+ "valid": false
+ },
+ {
+ "description": "a valid e-mail address",
+ "data": "joe.bloggs@example.com",
+ "valid": true
+ },
+ {
+ "description": "an invalid e-mail address",
+ "data": "2962",
+ "valid": false
+ }
+ ]
+ }
+]