[ { "description": "validation of date-time strings", "database": { "schemas": [ { "format": "date-time", "$id": "format_0_0" } ] }, "tests": [ { "description": "all string formats ignore integers", "data": 12, "valid": true, "schema_id": "format_0_0" }, { "description": "all string formats ignore floats", "data": 13.7, "valid": true, "schema_id": "format_0_0" }, { "description": "all string formats ignore objects", "data": {}, "valid": true, "schema_id": "format_0_0" }, { "description": "all string formats ignore arrays", "data": [], "valid": true, "schema_id": "format_0_0" }, { "description": "all string formats ignore booleans", "data": false, "valid": true, "schema_id": "format_0_0" }, { "description": "all string formats ignore nulls", "data": null, "valid": true, "schema_id": "format_0_0" }, { "description": "a valid date-time string", "data": "1963-06-19T08:30:06.283185Z", "valid": true, "schema_id": "format_0_0" }, { "description": "a valid date-time string without second fraction", "data": "1963-06-19T08:30:06Z", "valid": true, "schema_id": "format_0_0" }, { "description": "a valid date-time string with plus offset", "data": "1937-01-01T12:00:27.87+00:20", "valid": true, "schema_id": "format_0_0" }, { "description": "a valid date-time string with minus offset", "data": "1990-12-31T15:59:50.123-08:00", "valid": true, "schema_id": "format_0_0" }, { "description": "a valid date-time with a leap second, UTC", "data": "1998-12-31T23:59:60Z", "valid": true, "schema_id": "format_0_0" }, { "description": "a valid date-time with a leap second, with minus offset", "data": "1998-12-31T15:59:60.123-08:00", "valid": true, "schema_id": "format_0_0" }, { "description": "an invalid date-time past leap second, UTC", "data": "1998-12-31T23:59:61Z", "valid": false, "schema_id": "format_0_0" }, { "description": "an invalid date-time with leap second on a wrong minute, UTC", "data": "1998-12-31T23:58:60Z", "valid": false, "schema_id": "format_0_0" }, { "description": "an invalid date-time with leap second on a wrong hour, UTC", "data": "1998-12-31T22:59:60Z", "valid": false, "schema_id": "format_0_0" }, { "description": "an invalid day in date-time string", "data": "1990-02-31T15:59:59.123-08:00", "valid": false, "schema_id": "format_0_0" }, { "description": "an invalid offset in date-time string", "data": "1990-12-31T15:59:59-24:00", "valid": false, "schema_id": "format_0_0" }, { "description": "an invalid closing Z after time-zone offset", "data": "1963-06-19T08:30:06.28123+01:00Z", "valid": false, "schema_id": "format_0_0" }, { "description": "an invalid date-time string", "data": "06/19/1963 08:30:06 PST", "valid": false, "schema_id": "format_0_0" }, { "description": "case-insensitive T and Z", "data": "1963-06-19t08:30:06.283185z", "valid": true, "schema_id": "format_0_0" }, { "description": "only RFC3339 not all of ISO 8601 are valid", "data": "2013-350T01:01:01", "valid": false, "schema_id": "format_0_0" }, { "description": "invalid non-padded month dates", "data": "1963-6-19T08:30:06.283185Z", "valid": false, "schema_id": "format_0_0" }, { "description": "invalid non-padded day dates", "data": "1963-06-1T08:30:06.283185Z", "valid": false, "schema_id": "format_0_0" }, { "description": "invalid non-ASCII '৪' (a Bengali 4) in date portion", "data": "1963-06-1৪T00:00:00Z", "valid": false, "schema_id": "format_0_0" }, { "description": "invalid non-ASCII '৪' (a Bengali 4) in time portion", "data": "1963-06-11T0৪:00:00Z", "valid": false, "schema_id": "format_0_0" }, { "description": "invalid extended year", "data": "+11963-06-19T08:30:06.283185Z", "valid": false, "schema_id": "format_0_0" } ] }, { "description": "validation of date strings", "database": { "schemas": [ { "format": "date", "$id": "format_1_0" } ] }, "tests": [ { "description": "all string formats ignore integers", "data": 12, "valid": true, "schema_id": "format_1_0" }, { "description": "all string formats ignore floats", "data": 13.7, "valid": true, "schema_id": "format_1_0" }, { "description": "all string formats ignore objects", "data": {}, "valid": true, "schema_id": "format_1_0" }, { "description": "all string formats ignore arrays", "data": [], "valid": true, "schema_id": "format_1_0" }, { "description": "all string formats ignore booleans", "data": false, "valid": true, "schema_id": "format_1_0" }, { "description": "all string formats ignore nulls", "data": null, "valid": true, "schema_id": "format_1_0" }, { "description": "a valid date string", "data": "1963-06-19", "valid": true, "schema_id": "format_1_0" }, { "description": "a valid date string with 31 days in January", "data": "2020-01-31", "valid": true, "schema_id": "format_1_0" }, { "description": "a invalid date string with 32 days in January", "data": "2020-01-32", "valid": false, "schema_id": "format_1_0" }, { "description": "a valid date string with 28 days in February (normal)", "data": "2021-02-28", "valid": true, "schema_id": "format_1_0" }, { "description": "a invalid date string with 29 days in February (normal)", "data": "2021-02-29", "valid": false, "schema_id": "format_1_0" }, { "description": "a valid date string with 29 days in February (leap)", "data": "2020-02-29", "valid": true, "schema_id": "format_1_0" }, { "description": "a invalid date string with 30 days in February (leap)", "data": "2020-02-30", "valid": false, "schema_id": "format_1_0" }, { "description": "a valid date string with 31 days in March", "data": "2020-03-31", "valid": true, "schema_id": "format_1_0" }, { "description": "a invalid date string with 32 days in March", "data": "2020-03-32", "valid": false, "schema_id": "format_1_0" }, { "description": "a valid date string with 30 days in April", "data": "2020-04-30", "valid": true, "schema_id": "format_1_0" }, { "description": "a invalid date string with 31 days in April", "data": "2020-04-31", "valid": false, "schema_id": "format_1_0" }, { "description": "a valid date string with 31 days in May", "data": "2020-05-31", "valid": true, "schema_id": "format_1_0" }, { "description": "a invalid date string with 32 days in May", "data": "2020-05-32", "valid": false, "schema_id": "format_1_0" }, { "description": "a valid date string with 30 days in June", "data": "2020-06-30", "valid": true, "schema_id": "format_1_0" }, { "description": "a invalid date string with 31 days in June", "data": "2020-06-31", "valid": false, "schema_id": "format_1_0" }, { "description": "a valid date string with 31 days in July", "data": "2020-07-31", "valid": true, "schema_id": "format_1_0" }, { "description": "a invalid date string with 32 days in July", "data": "2020-07-32", "valid": false, "schema_id": "format_1_0" }, { "description": "a valid date string with 31 days in August", "data": "2020-08-31", "valid": true, "schema_id": "format_1_0" }, { "description": "a invalid date string with 32 days in August", "data": "2020-08-32", "valid": false, "schema_id": "format_1_0" }, { "description": "a valid date string with 30 days in September", "data": "2020-09-30", "valid": true, "schema_id": "format_1_0" }, { "description": "a invalid date string with 31 days in September", "data": "2020-09-31", "valid": false, "schema_id": "format_1_0" }, { "description": "a valid date string with 31 days in October", "data": "2020-10-31", "valid": true, "schema_id": "format_1_0" }, { "description": "a invalid date string with 32 days in October", "data": "2020-10-32", "valid": false, "schema_id": "format_1_0" }, { "description": "a valid date string with 30 days in November", "data": "2020-11-30", "valid": true, "schema_id": "format_1_0" }, { "description": "a invalid date string with 31 days in November", "data": "2020-11-31", "valid": false, "schema_id": "format_1_0" }, { "description": "a valid date string with 31 days in December", "data": "2020-12-31", "valid": true, "schema_id": "format_1_0" }, { "description": "a invalid date string with 32 days in December", "data": "2020-12-32", "valid": false, "schema_id": "format_1_0" }, { "description": "a invalid date string with invalid month", "data": "2020-13-01", "valid": false, "schema_id": "format_1_0" }, { "description": "an invalid date string", "data": "06/19/1963", "valid": false, "schema_id": "format_1_0" }, { "description": "only RFC3339 not all of ISO 8601 are valid", "data": "2013-350", "valid": false, "schema_id": "format_1_0" }, { "description": "non-padded month dates are not valid", "data": "1998-1-20", "valid": false, "schema_id": "format_1_0" }, { "description": "non-padded day dates are not valid", "data": "1998-01-1", "valid": false, "schema_id": "format_1_0" }, { "description": "invalid month", "data": "1998-13-01", "valid": false, "schema_id": "format_1_0" }, { "description": "invalid month-day combination", "data": "1998-04-31", "valid": false, "schema_id": "format_1_0" }, { "description": "2021 is not a leap year", "data": "2021-02-29", "valid": false, "schema_id": "format_1_0" }, { "description": "2020 is a leap year", "data": "2020-02-29", "valid": true, "schema_id": "format_1_0" }, { "description": "invalid non-ASCII '৪' (a Bengali 4)", "data": "1963-06-1৪", "valid": false, "schema_id": "format_1_0" }, { "description": "ISO8601 / non-RFC3339: YYYYMMDD without dashes (2023-03-28)", "data": "20230328", "valid": false, "schema_id": "format_1_0" }, { "description": "ISO8601 / non-RFC3339: week number implicit day of week (2023-01-02)", "data": "2023-W01", "valid": false, "schema_id": "format_1_0" }, { "description": "ISO8601 / non-RFC3339: week number with day of week (2023-03-28)", "data": "2023-W13-2", "valid": false, "schema_id": "format_1_0" }, { "description": "ISO8601 / non-RFC3339: week number rollover to next year (2023-01-01)", "data": "2022W527", "valid": false, "schema_id": "format_1_0" }, { "description": "an invalid time string in date-time format", "data": "2020-11-28T23:55:45Z", "valid": false, "schema_id": "format_1_0" } ] }, { "description": "validation of duration strings", "database": { "schemas": [ { "format": "duration", "$id": "format_2_0" } ] }, "tests": [ { "description": "all string formats ignore integers", "data": 12, "valid": true, "schema_id": "format_2_0" }, { "description": "all string formats ignore floats", "data": 13.7, "valid": true, "schema_id": "format_2_0" }, { "description": "all string formats ignore objects", "data": {}, "valid": true, "schema_id": "format_2_0" }, { "description": "all string formats ignore arrays", "data": [], "valid": true, "schema_id": "format_2_0" }, { "description": "all string formats ignore booleans", "data": false, "valid": true, "schema_id": "format_2_0" }, { "description": "all string formats ignore nulls", "data": null, "valid": true, "schema_id": "format_2_0" }, { "description": "a valid duration string", "data": "P4DT12H30M5S", "valid": true, "schema_id": "format_2_0" }, { "description": "an invalid duration string", "data": "PT1D", "valid": false, "schema_id": "format_2_0" }, { "description": "must start with P", "data": "4DT12H30M5S", "valid": false, "schema_id": "format_2_0" }, { "description": "no elements present", "data": "P", "valid": false, "schema_id": "format_2_0" }, { "description": "no time elements present", "data": "P1YT", "valid": false, "schema_id": "format_2_0" }, { "description": "no date or time elements present", "data": "PT", "valid": false, "schema_id": "format_2_0" }, { "description": "elements out of order", "data": "P2D1Y", "valid": false, "schema_id": "format_2_0" }, { "description": "missing time separator", "data": "P1D2H", "valid": false, "schema_id": "format_2_0" }, { "description": "time element in the date position", "data": "P2S", "valid": false, "schema_id": "format_2_0" }, { "description": "four years duration", "data": "P4Y", "valid": true, "schema_id": "format_2_0" }, { "description": "zero time, in seconds", "data": "PT0S", "valid": true, "schema_id": "format_2_0" }, { "description": "zero time, in days", "data": "P0D", "valid": true, "schema_id": "format_2_0" }, { "description": "one month duration", "data": "P1M", "valid": true, "schema_id": "format_2_0" }, { "description": "one minute duration", "data": "PT1M", "valid": true, "schema_id": "format_2_0" }, { "description": "one and a half days, in hours", "data": "PT36H", "valid": true, "schema_id": "format_2_0" }, { "description": "one and a half days, in days and hours", "data": "P1DT12H", "valid": true, "schema_id": "format_2_0" }, { "description": "two weeks", "data": "P2W", "valid": true, "schema_id": "format_2_0" }, { "description": "weeks cannot be combined with other units", "data": "P1Y2W", "valid": false, "schema_id": "format_2_0" }, { "description": "invalid non-ASCII '২' (a Bengali 2)", "data": "P২Y", "valid": false, "schema_id": "format_2_0" }, { "description": "element without unit", "data": "P1", "valid": false, "schema_id": "format_2_0" } ] }, { "description": "\\a is not an ECMA 262 control escape", "database": { "schemas": [ { "format": "regex", "$id": "format_3_0" } ] }, "tests": [ { "description": "when used as a pattern", "data": "\\a", "valid": true, "schema_id": "format_3_0" } ] }, { "description": "validation of e-mail addresses", "database": { "schemas": [ { "format": "email", "$id": "format_4_0" } ] }, "tests": [ { "description": "all string formats ignore integers", "data": 12, "valid": true, "schema_id": "format_4_0" }, { "description": "all string formats ignore floats", "data": 13.7, "valid": true, "schema_id": "format_4_0" }, { "description": "all string formats ignore objects", "data": {}, "valid": true, "schema_id": "format_4_0" }, { "description": "all string formats ignore arrays", "data": [], "valid": true, "schema_id": "format_4_0" }, { "description": "all string formats ignore booleans", "data": false, "valid": true, "schema_id": "format_4_0" }, { "description": "all string formats ignore nulls", "data": null, "valid": true, "schema_id": "format_4_0" }, { "description": "a valid e-mail address", "data": "joe.bloggs@example.com", "valid": true, "schema_id": "format_4_0" }, { "description": "an invalid e-mail address", "data": "2962", "valid": false, "schema_id": "format_4_0" }, { "description": "tilde in local part is valid", "data": "te~st@example.com", "valid": true, "schema_id": "format_4_0" }, { "description": "tilde before local part is valid", "data": "~test@example.com", "valid": true, "schema_id": "format_4_0" }, { "description": "tilde after local part is valid", "data": "test~@example.com", "valid": true, "schema_id": "format_4_0" }, { "description": "a quoted string with a space in the local part is valid", "data": "\"joe bloggs\"@example.com", "valid": true, "schema_id": "format_4_0" }, { "description": "a quoted string with a double dot in the local part is valid", "data": "\"joe..bloggs\"@example.com", "valid": true, "schema_id": "format_4_0" }, { "description": "a quoted string with a @ in the local part is valid", "data": "\"joe@bloggs\"@example.com", "valid": true, "schema_id": "format_4_0" }, { "description": "an IPv4-address-literal after the @ is valid", "data": "joe.bloggs@[127.0.0.1]", "valid": true, "schema_id": "format_4_0" }, { "description": "an IPv6-address-literal after the @ is valid", "data": "joe.bloggs@[IPv6:::1]", "valid": true, "schema_id": "format_4_0" }, { "description": "dot before local part is not valid", "data": ".test@example.com", "valid": false, "schema_id": "format_4_0" }, { "description": "dot after local part is not valid", "data": "test.@example.com", "valid": false, "schema_id": "format_4_0" }, { "description": "two separated dots inside local part are valid", "data": "te.s.t@example.com", "valid": true, "schema_id": "format_4_0" }, { "description": "two subsequent dots inside local part are not valid", "data": "te..st@example.com", "valid": false, "schema_id": "format_4_0" }, { "description": "an invalid domain", "data": "joe.bloggs@invalid=domain.com", "valid": false, "schema_id": "format_4_0" }, { "description": "an invalid IPv4-address-literal", "data": "joe.bloggs@[127.0.0.300]", "valid": false, "schema_id": "format_4_0" }, { "description": "two email addresses is not valid", "data": "user1@oceania.org, user2@oceania.org", "valid": false, "schema_id": "format_4_0" }, { "description": "full \"From\" header is invalid", "data": "\"Winston Smith\" (Records Department)", "valid": false, "schema_id": "format_4_0" } ] }, { "description": "validation of host names", "database": { "schemas": [ { "format": "hostname", "$id": "format_5_0" } ] }, "tests": [ { "description": "all string formats ignore integers", "data": 12, "valid": true, "schema_id": "format_5_0" }, { "description": "all string formats ignore floats", "data": 13.7, "valid": true, "schema_id": "format_5_0" }, { "description": "all string formats ignore objects", "data": {}, "valid": true, "schema_id": "format_5_0" }, { "description": "all string formats ignore arrays", "data": [], "valid": true, "schema_id": "format_5_0" }, { "description": "all string formats ignore booleans", "data": false, "valid": true, "schema_id": "format_5_0" }, { "description": "all string formats ignore nulls", "data": null, "valid": true, "schema_id": "format_5_0" }, { "description": "a valid host name", "data": "www.example.com", "valid": true, "schema_id": "format_5_0" }, { "description": "single label", "data": "hostname", "valid": true, "schema_id": "format_5_0" }, { "description": "single label with digits", "data": "h0stn4me", "valid": true, "schema_id": "format_5_0" }, { "description": "single label starting with digit", "data": "1host", "valid": true, "schema_id": "format_5_0" }, { "description": "single label ending with digit", "data": "hostnam3", "valid": true, "schema_id": "format_5_0" }, { "description": "empty string", "data": "", "valid": true, "schema_id": "format_5_0" }, { "description": "single dot", "data": ".", "valid": false, "schema_id": "format_5_0" }, { "description": "leading dot", "data": ".example", "valid": false, "schema_id": "format_5_0" }, { "description": "trailing dot", "data": "example.", "valid": false, "schema_id": "format_5_0" }, { "description": "IDN label separator", "data": "example.com", "valid": false, "schema_id": "format_5_0" }, { "description": "single label with hyphen", "data": "host-name", "valid": true, "schema_id": "format_5_0" }, { "description": "starts with hyphen", "data": "-hostname", "valid": false, "schema_id": "format_5_0" }, { "description": "ends with hyphen", "data": "hostname-", "valid": false, "schema_id": "format_5_0" }, { "description": "contains \"--\" in the 3rd and 4th position", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", "data": "XN--aa---o47jg78q", "valid": false, "schema_id": "format_5_0" }, { "description": "contains underscore", "data": "host_name", "valid": false, "schema_id": "format_5_0" }, { "description": "exceeds maximum overall length (256)", "data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.com", "valid": false, "schema_id": "format_5_0" }, { "description": "maximum label length (63)", "data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.com", "valid": true, "schema_id": "format_5_0" }, { "description": "exceeds maximum label length (63)", "data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl.com", "valid": false, "schema_id": "format_5_0" } ] }, { "description": "validation of A-label (punycode) host names", "database": { "schemas": [ { "format": "hostname", "$id": "format_6_0" } ] }, "tests": [ { "description": "invalid Punycode", "comment": "https://tools.ietf.org/html/rfc5891#section-4.4 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", "data": "xn--X", "valid": false, "schema_id": "format_6_0" }, { "description": "a valid host name (example.test in Hangul)", "data": "xn--9n2bp8q.xn--9t4b11yi5a", "valid": true, "schema_id": "format_6_0" }, { "description": "contains illegal char U+302E Hangul single dot tone mark", "data": "xn--07jt112bpxg.xn--9t4b11yi5a", "valid": false, "schema_id": "format_6_0" }, { "description": "Begins with a Spacing Combining Mark", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", "data": "xn--hello-txk", "valid": false, "schema_id": "format_6_0" }, { "description": "Begins with a Nonspacing Mark", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", "data": "xn--hello-zed", "valid": false, "schema_id": "format_6_0" }, { "description": "Begins with an Enclosing Mark", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", "data": "xn--hello-6bf", "valid": false, "schema_id": "format_6_0" }, { "description": "Exceptions that are PVALID, left-to-right chars", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", "data": "xn--zca29lwxobi7a", "valid": true, "schema_id": "format_6_0" }, { "description": "Exceptions that are PVALID, right-to-left chars", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", "data": "xn--qmbc", "valid": true, "schema_id": "format_6_0" }, { "description": "Exceptions that are DISALLOWED, right-to-left chars", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", "data": "xn--chb89f", "valid": false, "schema_id": "format_6_0" }, { "description": "Exceptions that are DISALLOWED, left-to-right chars", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6 Note: The two combining marks (U+302E and U+302F) are in the middle and not at the start", "data": "xn--07jceefgh4c", "valid": false, "schema_id": "format_6_0" }, { "description": "MIDDLE DOT with no preceding 'l'", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", "data": "xn--al-0ea", "valid": false, "schema_id": "format_6_0" }, { "description": "MIDDLE DOT with nothing preceding", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", "data": "xn--l-fda", "valid": false, "schema_id": "format_6_0" }, { "description": "MIDDLE DOT with no following 'l'", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", "data": "xn--la-0ea", "valid": false, "schema_id": "format_6_0" }, { "description": "MIDDLE DOT with nothing following", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", "data": "xn--l-gda", "valid": false, "schema_id": "format_6_0" }, { "description": "MIDDLE DOT with surrounding 'l's", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", "data": "xn--ll-0ea", "valid": true, "schema_id": "format_6_0" }, { "description": "Greek KERAIA not followed by Greek", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", "data": "xn--S-jib3p", "valid": false, "schema_id": "format_6_0" }, { "description": "Greek KERAIA not followed by anything", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", "data": "xn--wva3j", "valid": false, "schema_id": "format_6_0" }, { "description": "Greek KERAIA followed by Greek", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", "data": "xn--wva3je", "valid": true, "schema_id": "format_6_0" }, { "description": "Hebrew GERESH not preceded by Hebrew", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", "data": "xn--A-2hc5h", "valid": false, "schema_id": "format_6_0" }, { "description": "Hebrew GERESH not preceded by anything", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", "data": "xn--5db1e", "valid": false, "schema_id": "format_6_0" }, { "description": "Hebrew GERESH preceded by Hebrew", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", "data": "xn--4dbc5h", "valid": true, "schema_id": "format_6_0" }, { "description": "Hebrew GERSHAYIM not preceded by Hebrew", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", "data": "xn--A-2hc8h", "valid": false, "schema_id": "format_6_0" }, { "description": "Hebrew GERSHAYIM not preceded by anything", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", "data": "xn--5db3e", "valid": false, "schema_id": "format_6_0" }, { "description": "Hebrew GERSHAYIM preceded by Hebrew", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", "data": "xn--4dbc8h", "valid": true, "schema_id": "format_6_0" }, { "description": "KATAKANA MIDDLE DOT with no Hiragana, Katakana, or Han", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", "data": "xn--defabc-k64e", "valid": false, "schema_id": "format_6_0" }, { "description": "KATAKANA MIDDLE DOT with no other characters", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", "data": "xn--vek", "valid": false, "schema_id": "format_6_0" }, { "description": "KATAKANA MIDDLE DOT with Hiragana", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", "data": "xn--k8j5u", "valid": true, "schema_id": "format_6_0" }, { "description": "KATAKANA MIDDLE DOT with Katakana", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", "data": "xn--bck0j", "valid": true, "schema_id": "format_6_0" }, { "description": "KATAKANA MIDDLE DOT with Han", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", "data": "xn--vek778f", "valid": true, "schema_id": "format_6_0" }, { "description": "Arabic-Indic digits mixed with Extended Arabic-Indic digits", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.8", "data": "xn--ngb6iyr", "valid": false, "schema_id": "format_6_0" }, { "description": "Arabic-Indic digits not mixed with Extended Arabic-Indic digits", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.8", "data": "xn--ngba1o", "valid": true, "schema_id": "format_6_0" }, { "description": "Extended Arabic-Indic digits not mixed with Arabic-Indic digits", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.9", "data": "xn--0-gyc", "valid": true, "schema_id": "format_6_0" }, { "description": "ZERO WIDTH JOINER not preceded by Virama", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf", "data": "xn--11b2er09f", "valid": false, "schema_id": "format_6_0" }, { "description": "ZERO WIDTH JOINER not preceded by anything", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf", "data": "xn--02b508i", "valid": false, "schema_id": "format_6_0" }, { "description": "ZERO WIDTH JOINER preceded by Virama", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf", "data": "xn--11b2ezcw70k", "valid": true, "schema_id": "format_6_0" }, { "description": "ZERO WIDTH NON-JOINER preceded by Virama", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1", "data": "xn--11b2ezcs70k", "valid": true, "schema_id": "format_6_0" }, { "description": "ZERO WIDTH NON-JOINER not preceded by Virama but matches regexp", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1 https://www.w3.org/TR/alreq/#h_disjoining_enforcement", "data": "xn--ngba5hb2804a", "valid": true, "schema_id": "format_6_0" } ] }, { "description": "validation of an internationalized e-mail addresses", "database": { "schemas": [ { "format": "idn-email", "$id": "format_7_0" } ] }, "tests": [ { "description": "all string formats ignore integers", "data": 12, "valid": true, "schema_id": "format_7_0" }, { "description": "all string formats ignore floats", "data": 13.7, "valid": true, "schema_id": "format_7_0" }, { "description": "all string formats ignore objects", "data": {}, "valid": true, "schema_id": "format_7_0" }, { "description": "all string formats ignore arrays", "data": [], "valid": true, "schema_id": "format_7_0" }, { "description": "all string formats ignore booleans", "data": false, "valid": true, "schema_id": "format_7_0" }, { "description": "all string formats ignore nulls", "data": null, "valid": true, "schema_id": "format_7_0" }, { "description": "a valid idn e-mail (example@example.test in Hangul)", "data": "실례@실례.테스트", "valid": true, "schema_id": "format_7_0" }, { "description": "an invalid idn e-mail address", "data": "2962", "valid": false, "schema_id": "format_7_0" }, { "description": "a valid e-mail address", "data": "joe.bloggs@example.com", "valid": true, "schema_id": "format_7_0" }, { "description": "an invalid e-mail address", "data": "2962", "valid": false, "schema_id": "format_7_0" } ] }, { "description": "validation of internationalized host names", "database": { "schemas": [ { "format": "idn-hostname", "$id": "format_8_0" } ] }, "tests": [ { "description": "all string formats ignore integers", "data": 12, "valid": true, "schema_id": "format_8_0" }, { "description": "all string formats ignore floats", "data": 13.7, "valid": true, "schema_id": "format_8_0" }, { "description": "all string formats ignore objects", "data": {}, "valid": true, "schema_id": "format_8_0" }, { "description": "all string formats ignore arrays", "data": [], "valid": true, "schema_id": "format_8_0" }, { "description": "all string formats ignore booleans", "data": false, "valid": true, "schema_id": "format_8_0" }, { "description": "all string formats ignore nulls", "data": null, "valid": true, "schema_id": "format_8_0" }, { "description": "a valid host name (example.test in Hangul)", "data": "실례.테스트", "valid": true, "schema_id": "format_8_0" }, { "description": "illegal first char U+302E Hangul single dot tone mark", "data": "〮실례.테스트", "valid": false, "schema_id": "format_8_0" }, { "description": "contains illegal char U+302E Hangul single dot tone mark", "data": "실〮례.테스트", "valid": false, "schema_id": "format_8_0" }, { "description": "a host name with a component too long", "data": "실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실례례테스트례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례테스트례례실례.테스트", "valid": false, "schema_id": "format_8_0" }, { "description": "invalid label, correct Punycode", "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5891#section-4.4 https://tools.ietf.org/html/rfc3492#section-7.1", "data": "-> $1.00 <--", "valid": false, "schema_id": "format_8_0" }, { "description": "valid Chinese Punycode", "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5891#section-4.4", "data": "xn--ihqwcrb4cv8a8dqg056pqjye", "valid": true, "schema_id": "format_8_0" }, { "description": "invalid Punycode", "comment": "https://tools.ietf.org/html/rfc5891#section-4.4 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", "data": "xn--X", "valid": false, "schema_id": "format_8_0" }, { "description": "U-label contains \"--\" in the 3rd and 4th position", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", "data": "XN--aa---o47jg78q", "valid": false, "schema_id": "format_8_0" }, { "description": "U-label starts with a dash", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1", "data": "-hello", "valid": false, "schema_id": "format_8_0" }, { "description": "U-label ends with a dash", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1", "data": "hello-", "valid": false, "schema_id": "format_8_0" }, { "description": "U-label starts and ends with a dash", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1", "data": "-hello-", "valid": false, "schema_id": "format_8_0" }, { "description": "Begins with a Spacing Combining Mark", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", "data": "ःhello", "valid": false, "schema_id": "format_8_0" }, { "description": "Begins with a Nonspacing Mark", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", "data": "̀hello", "valid": false, "schema_id": "format_8_0" }, { "description": "Begins with an Enclosing Mark", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", "data": "҈hello", "valid": false, "schema_id": "format_8_0" }, { "description": "Exceptions that are PVALID, left-to-right chars", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", "data": "ßς་〇", "valid": true, "schema_id": "format_8_0" }, { "description": "Exceptions that are PVALID, right-to-left chars", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", "data": "۽۾", "valid": true, "schema_id": "format_8_0" }, { "description": "Exceptions that are DISALLOWED, right-to-left chars", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", "data": "ـߺ", "valid": false, "schema_id": "format_8_0" }, { "description": "Exceptions that are DISALLOWED, left-to-right chars", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6 Note: The two combining marks (U+302E and U+302F) are in the middle and not at the start", "data": "〱〲〳〴〵〮〯〻", "valid": false, "schema_id": "format_8_0" }, { "description": "MIDDLE DOT with no preceding 'l'", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", "data": "a·l", "valid": false, "schema_id": "format_8_0" }, { "description": "MIDDLE DOT with nothing preceding", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", "data": "·l", "valid": false, "schema_id": "format_8_0" }, { "description": "MIDDLE DOT with no following 'l'", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", "data": "l·a", "valid": false, "schema_id": "format_8_0" }, { "description": "MIDDLE DOT with nothing following", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", "data": "l·", "valid": false, "schema_id": "format_8_0" }, { "description": "MIDDLE DOT with surrounding 'l's", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", "data": "l·l", "valid": true, "schema_id": "format_8_0" }, { "description": "Greek KERAIA not followed by Greek", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", "data": "α͵S", "valid": false, "schema_id": "format_8_0" }, { "description": "Greek KERAIA not followed by anything", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", "data": "α͵", "valid": false, "schema_id": "format_8_0" }, { "description": "Greek KERAIA followed by Greek", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", "data": "α͵β", "valid": true, "schema_id": "format_8_0" }, { "description": "Hebrew GERESH not preceded by Hebrew", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", "data": "A׳ב", "valid": false, "schema_id": "format_8_0" }, { "description": "Hebrew GERESH not preceded by anything", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", "data": "׳ב", "valid": false, "schema_id": "format_8_0" }, { "description": "Hebrew GERESH preceded by Hebrew", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", "data": "א׳ב", "valid": true, "schema_id": "format_8_0" }, { "description": "Hebrew GERSHAYIM not preceded by Hebrew", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", "data": "A״ב", "valid": false, "schema_id": "format_8_0" }, { "description": "Hebrew GERSHAYIM not preceded by anything", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", "data": "״ב", "valid": false, "schema_id": "format_8_0" }, { "description": "Hebrew GERSHAYIM preceded by Hebrew", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", "data": "א״ב", "valid": true, "schema_id": "format_8_0" }, { "description": "KATAKANA MIDDLE DOT with no Hiragana, Katakana, or Han", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", "data": "def・abc", "valid": false, "schema_id": "format_8_0" }, { "description": "KATAKANA MIDDLE DOT with no other characters", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", "data": "・", "valid": false, "schema_id": "format_8_0" }, { "description": "KATAKANA MIDDLE DOT with Hiragana", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", "data": "・ぁ", "valid": true, "schema_id": "format_8_0" }, { "description": "KATAKANA MIDDLE DOT with Katakana", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", "data": "・ァ", "valid": true, "schema_id": "format_8_0" }, { "description": "KATAKANA MIDDLE DOT with Han", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", "data": "・丈", "valid": true, "schema_id": "format_8_0" }, { "description": "Arabic-Indic digits mixed with Extended Arabic-Indic digits", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.8", "data": "ب٠۰", "valid": false, "schema_id": "format_8_0" }, { "description": "Arabic-Indic digits not mixed with Extended Arabic-Indic digits", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.8", "data": "ب٠ب", "valid": true, "schema_id": "format_8_0" }, { "description": "Extended Arabic-Indic digits not mixed with Arabic-Indic digits", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.9", "data": "۰0", "valid": true, "schema_id": "format_8_0" }, { "description": "ZERO WIDTH JOINER not preceded by Virama", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf", "data": "क‍ष", "valid": false, "schema_id": "format_8_0" }, { "description": "ZERO WIDTH JOINER not preceded by anything", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf", "data": "‍ष", "valid": false, "schema_id": "format_8_0" }, { "description": "ZERO WIDTH JOINER preceded by Virama", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf", "data": "क्‍ष", "valid": true, "schema_id": "format_8_0" }, { "description": "ZERO WIDTH NON-JOINER preceded by Virama", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1", "data": "क्‌ष", "valid": true, "schema_id": "format_8_0" }, { "description": "ZERO WIDTH NON-JOINER not preceded by Virama but matches regexp", "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1 https://www.w3.org/TR/alreq/#h_disjoining_enforcement", "data": "بي‌بي", "valid": true, "schema_id": "format_8_0" }, { "description": "single label", "data": "hostname", "valid": true, "schema_id": "format_8_0" }, { "description": "single label with hyphen", "data": "host-name", "valid": true, "schema_id": "format_8_0" }, { "description": "single label with digits", "data": "h0stn4me", "valid": true, "schema_id": "format_8_0" }, { "description": "single label starting with digit", "data": "1host", "valid": true, "schema_id": "format_8_0" }, { "description": "single label ending with digit", "data": "hostnam3", "valid": true, "schema_id": "format_8_0" }, { "description": "empty string", "data": "", "valid": true, "schema_id": "format_8_0" } ] }, { "description": "validation of separators in internationalized host names", "specification": [ { "rfc3490": "3.1", "quote": "Whenever dots are used as label separators, the following characters MUST be recognized as dots: U+002E (full stop), U+3002 (ideographic full stop), U+FF0E (fullwidth full stop), U+FF61(halfwidth ideographic full stop)" } ], "database": { "schemas": [ { "format": "idn-hostname", "$id": "format_9_0" } ] }, "tests": [ { "description": "single dot", "data": ".", "valid": false, "schema_id": "format_9_0" }, { "description": "single ideographic full stop", "data": "。", "valid": false, "schema_id": "format_9_0" }, { "description": "single fullwidth full stop", "data": ".", "valid": false, "schema_id": "format_9_0" }, { "description": "single halfwidth ideographic full stop", "data": "。", "valid": false, "schema_id": "format_9_0" }, { "description": "dot as label separator", "data": "a.b", "valid": true, "schema_id": "format_9_0" }, { "description": "ideographic full stop as label separator", "data": "a。b", "valid": true, "schema_id": "format_9_0" }, { "description": "fullwidth full stop as label separator", "data": "a.b", "valid": true, "schema_id": "format_9_0" }, { "description": "halfwidth ideographic full stop as label separator", "data": "a。b", "valid": true, "schema_id": "format_9_0" }, { "description": "leading dot", "data": ".example", "valid": false, "schema_id": "format_9_0" }, { "description": "leading ideographic full stop", "data": "。example", "valid": false, "schema_id": "format_9_0" }, { "description": "leading fullwidth full stop", "data": ".example", "valid": false, "schema_id": "format_9_0" }, { "description": "leading halfwidth ideographic full stop", "data": "。example", "valid": false, "schema_id": "format_9_0" }, { "description": "trailing dot", "data": "example.", "valid": false, "schema_id": "format_9_0" }, { "description": "trailing ideographic full stop", "data": "example。", "valid": false, "schema_id": "format_9_0" }, { "description": "trailing fullwidth full stop", "data": "example.", "valid": false, "schema_id": "format_9_0" }, { "description": "trailing halfwidth ideographic full stop", "data": "example。", "valid": false, "schema_id": "format_9_0" }, { "description": "label too long if separator ignored (full stop)", "data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπα.com", "valid": true, "schema_id": "format_9_0" }, { "description": "label too long if separator ignored (ideographic full stop)", "data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπα。com", "valid": true, "schema_id": "format_9_0" }, { "description": "label too long if separator ignored (fullwidth full stop)", "data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπα.com", "valid": true, "schema_id": "format_9_0" }, { "description": "label too long if separator ignored (halfwidth ideographic full stop)", "data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπα。com", "valid": true, "schema_id": "format_9_0" } ] }, { "description": "validation of IP addresses", "database": { "schemas": [ { "format": "ipv4", "$id": "format_10_0" } ] }, "tests": [ { "description": "all string formats ignore integers", "data": 12, "valid": true, "schema_id": "format_10_0" }, { "description": "all string formats ignore floats", "data": 13.7, "valid": true, "schema_id": "format_10_0" }, { "description": "all string formats ignore objects", "data": {}, "valid": true, "schema_id": "format_10_0" }, { "description": "all string formats ignore arrays", "data": [], "valid": true, "schema_id": "format_10_0" }, { "description": "all string formats ignore booleans", "data": false, "valid": true, "schema_id": "format_10_0" }, { "description": "all string formats ignore nulls", "data": null, "valid": true, "schema_id": "format_10_0" }, { "description": "a valid IP address", "data": "192.168.0.1", "valid": true, "schema_id": "format_10_0" }, { "description": "an IP address with too many components", "data": "127.0.0.0.1", "valid": false, "schema_id": "format_10_0" }, { "description": "an IP address with out-of-range values", "data": "256.256.256.256", "valid": false, "schema_id": "format_10_0" }, { "description": "an IP address without 4 components", "data": "127.0", "valid": false, "schema_id": "format_10_0" }, { "description": "an IP address as an integer", "data": "0x7f000001", "valid": false, "schema_id": "format_10_0" }, { "description": "an IP address as an integer (decimal)", "data": "2130706433", "valid": false, "schema_id": "format_10_0" }, { "description": "invalid leading zeroes, as they are treated as octals", "comment": "see https://sick.codes/universal-netmask-npm-package-used-by-270000-projects-vulnerable-to-octal-input-data-server-side-request-forgery-remote-file-inclusion-local-file-inclusion-and-more-cve-2021-28918/", "data": "087.10.0.1", "valid": false, "schema_id": "format_10_0" }, { "description": "value without leading zero is valid", "data": "87.10.0.1", "valid": true, "schema_id": "format_10_0" }, { "description": "invalid non-ASCII '২' (a Bengali 2)", "data": "1২7.0.0.1", "valid": false, "schema_id": "format_10_0" }, { "description": "netmask is not a part of ipv4 address", "data": "192.168.1.0/24", "valid": false, "schema_id": "format_10_0" } ] }, { "description": "validation of IPv6 addresses", "database": { "schemas": [ { "format": "ipv6", "$id": "format_11_0" } ] }, "tests": [ { "description": "all string formats ignore integers", "data": 12, "valid": true, "schema_id": "format_11_0" }, { "description": "all string formats ignore floats", "data": 13.7, "valid": true, "schema_id": "format_11_0" }, { "description": "all string formats ignore objects", "data": {}, "valid": true, "schema_id": "format_11_0" }, { "description": "all string formats ignore arrays", "data": [], "valid": true, "schema_id": "format_11_0" }, { "description": "all string formats ignore booleans", "data": false, "valid": true, "schema_id": "format_11_0" }, { "description": "all string formats ignore nulls", "data": null, "valid": true, "schema_id": "format_11_0" }, { "description": "a valid IPv6 address", "data": "::1", "valid": true, "schema_id": "format_11_0" }, { "description": "an IPv6 address with out-of-range values", "data": "12345::", "valid": false, "schema_id": "format_11_0" }, { "description": "trailing 4 hex symbols is valid", "data": "::abef", "valid": true, "schema_id": "format_11_0" }, { "description": "trailing 5 hex symbols is invalid", "data": "::abcef", "valid": false, "schema_id": "format_11_0" }, { "description": "an IPv6 address with too many components", "data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1", "valid": false, "schema_id": "format_11_0" }, { "description": "an IPv6 address containing illegal characters", "data": "::laptop", "valid": false, "schema_id": "format_11_0" }, { "description": "no digits is valid", "data": "::", "valid": true, "schema_id": "format_11_0" }, { "description": "leading colons is valid", "data": "::42:ff:1", "valid": true, "schema_id": "format_11_0" }, { "description": "trailing colons is valid", "data": "d6::", "valid": true, "schema_id": "format_11_0" }, { "description": "missing leading octet is invalid", "data": ":2:3:4:5:6:7:8", "valid": false, "schema_id": "format_11_0" }, { "description": "missing trailing octet is invalid", "data": "1:2:3:4:5:6:7:", "valid": false, "schema_id": "format_11_0" }, { "description": "missing leading octet with omitted octets later", "data": ":2:3:4::8", "valid": false, "schema_id": "format_11_0" }, { "description": "single set of double colons in the middle is valid", "data": "1:d6::42", "valid": true, "schema_id": "format_11_0" }, { "description": "two sets of double colons is invalid", "data": "1::d6::42", "valid": false, "schema_id": "format_11_0" }, { "description": "mixed format with the ipv4 section as decimal octets", "data": "1::d6:192.168.0.1", "valid": true, "schema_id": "format_11_0" }, { "description": "mixed format with double colons between the sections", "data": "1:2::192.168.0.1", "valid": true, "schema_id": "format_11_0" }, { "description": "mixed format with ipv4 section with octet out of range", "data": "1::2:192.168.256.1", "valid": false, "schema_id": "format_11_0" }, { "description": "mixed format with ipv4 section with a hex octet", "data": "1::2:192.168.ff.1", "valid": false, "schema_id": "format_11_0" }, { "description": "mixed format with leading double colons (ipv4-mapped ipv6 address)", "data": "::ffff:192.168.0.1", "valid": true, "schema_id": "format_11_0" }, { "description": "triple colons is invalid", "data": "1:2:3:4:5:::8", "valid": false, "schema_id": "format_11_0" }, { "description": "8 octets", "data": "1:2:3:4:5:6:7:8", "valid": true, "schema_id": "format_11_0" }, { "description": "insufficient octets without double colons", "data": "1:2:3:4:5:6:7", "valid": false, "schema_id": "format_11_0" }, { "description": "no colons is invalid", "data": "1", "valid": false, "schema_id": "format_11_0" }, { "description": "ipv4 is not ipv6", "data": "127.0.0.1", "valid": false, "schema_id": "format_11_0" }, { "description": "ipv4 segment must have 4 octets", "data": "1:2:3:4:1.2.3", "valid": false, "schema_id": "format_11_0" }, { "description": "leading whitespace is invalid", "data": " ::1", "valid": false, "schema_id": "format_11_0" }, { "description": "trailing whitespace is invalid", "data": "::1 ", "valid": false, "schema_id": "format_11_0" }, { "description": "netmask is not a part of ipv6 address", "data": "fe80::/64", "valid": false, "schema_id": "format_11_0" }, { "description": "zone id is not a part of ipv6 address", "data": "fe80::a%eth1", "valid": false, "schema_id": "format_11_0" }, { "description": "a long valid ipv6", "data": "1000:1000:1000:1000:1000:1000:255.255.255.255", "valid": true, "schema_id": "format_11_0" }, { "description": "a long invalid ipv6, below length limit, first", "data": "100:100:100:100:100:100:255.255.255.255.255", "valid": false, "schema_id": "format_11_0" }, { "description": "a long invalid ipv6, below length limit, second", "data": "100:100:100:100:100:100:100:255.255.255.255", "valid": false, "schema_id": "format_11_0" }, { "description": "invalid non-ASCII '৪' (a Bengali 4)", "data": "1:2:3:4:5:6:7:৪", "valid": false, "schema_id": "format_11_0" }, { "description": "invalid non-ASCII '৪' (a Bengali 4) in the IPv4 portion", "data": "1:2::192.16৪.0.1", "valid": false, "schema_id": "format_11_0" } ] }, { "description": "validation of IRI References", "database": { "schemas": [ { "format": "iri-reference", "$id": "format_12_0" } ] }, "tests": [ { "description": "all string formats ignore integers", "data": 12, "valid": true, "schema_id": "format_12_0" }, { "description": "all string formats ignore floats", "data": 13.7, "valid": true, "schema_id": "format_12_0" }, { "description": "all string formats ignore objects", "data": {}, "valid": true, "schema_id": "format_12_0" }, { "description": "all string formats ignore arrays", "data": [], "valid": true, "schema_id": "format_12_0" }, { "description": "all string formats ignore booleans", "data": false, "valid": true, "schema_id": "format_12_0" }, { "description": "all string formats ignore nulls", "data": null, "valid": true, "schema_id": "format_12_0" }, { "description": "a valid IRI", "data": "http://ƒøø.ßår/?∂éœ=πîx#πîüx", "valid": true, "schema_id": "format_12_0" }, { "description": "a valid protocol-relative IRI Reference", "data": "//ƒøø.ßår/?∂éœ=πîx#πîüx", "valid": true, "schema_id": "format_12_0" }, { "description": "a valid relative IRI Reference", "data": "/âππ", "valid": true, "schema_id": "format_12_0" }, { "description": "an invalid IRI Reference", "data": "\\\\WINDOWS\\filëßåré", "valid": false, "schema_id": "format_12_0" }, { "description": "a valid IRI Reference", "data": "âππ", "valid": true, "schema_id": "format_12_0" }, { "description": "a valid IRI fragment", "data": "#ƒrägmênt", "valid": true, "schema_id": "format_12_0" }, { "description": "an invalid IRI fragment", "data": "#ƒräg\\mênt", "valid": false, "schema_id": "format_12_0" } ] }, { "description": "validation of IRIs", "database": { "schemas": [ { "format": "iri", "$id": "format_13_0" } ] }, "tests": [ { "description": "all string formats ignore integers", "data": 12, "valid": true, "schema_id": "format_13_0" }, { "description": "all string formats ignore floats", "data": 13.7, "valid": true, "schema_id": "format_13_0" }, { "description": "all string formats ignore objects", "data": {}, "valid": true, "schema_id": "format_13_0" }, { "description": "all string formats ignore arrays", "data": [], "valid": true, "schema_id": "format_13_0" }, { "description": "all string formats ignore booleans", "data": false, "valid": true, "schema_id": "format_13_0" }, { "description": "all string formats ignore nulls", "data": null, "valid": true, "schema_id": "format_13_0" }, { "description": "a valid IRI with anchor tag", "data": "http://ƒøø.ßår/?∂éœ=πîx#πîüx", "valid": true, "schema_id": "format_13_0" }, { "description": "a valid IRI with anchor tag and parentheses", "data": "http://ƒøø.com/blah_(wîkïpédiå)_blah#ßité-1", "valid": true, "schema_id": "format_13_0" }, { "description": "a valid IRI with URL-encoded stuff", "data": "http://ƒøø.ßår/?q=Test%20URL-encoded%20stuff", "valid": true, "schema_id": "format_13_0" }, { "description": "a valid IRI with many special characters", "data": "http://-.~_!$&'()*+,;=:%40:80%2f::::::@example.com", "valid": true, "schema_id": "format_13_0" }, { "description": "a valid IRI based on IPv6", "data": "http://[2001:0db8:85a3:0000:0000:8a2e:0370:7334]", "valid": true, "schema_id": "format_13_0" }, { "description": "an invalid IRI based on IPv6", "data": "http://2001:0db8:85a3:0000:0000:8a2e:0370:7334", "valid": false, "schema_id": "format_13_0" }, { "description": "an invalid relative IRI Reference", "data": "/abc", "valid": false, "schema_id": "format_13_0" }, { "description": "an invalid IRI", "data": "\\\\WINDOWS\\filëßåré", "valid": false, "schema_id": "format_13_0" }, { "description": "an invalid IRI though valid IRI reference", "data": "âππ", "valid": false, "schema_id": "format_13_0" } ] }, { "description": "validation of JSON-pointers (JSON String Representation)", "database": { "schemas": [ { "format": "json-pointer", "$id": "format_14_0" } ] }, "tests": [ { "description": "all string formats ignore integers", "data": 12, "valid": true, "schema_id": "format_14_0" }, { "description": "all string formats ignore floats", "data": 13.7, "valid": true, "schema_id": "format_14_0" }, { "description": "all string formats ignore objects", "data": {}, "valid": true, "schema_id": "format_14_0" }, { "description": "all string formats ignore arrays", "data": [], "valid": true, "schema_id": "format_14_0" }, { "description": "all string formats ignore booleans", "data": false, "valid": true, "schema_id": "format_14_0" }, { "description": "all string formats ignore nulls", "data": null, "valid": true, "schema_id": "format_14_0" }, { "description": "a valid JSON-pointer", "data": "/foo/bar~0/baz~1/%a", "valid": true, "schema_id": "format_14_0" }, { "description": "not a valid JSON-pointer (~ not escaped)", "data": "/foo/bar~", "valid": false, "schema_id": "format_14_0" }, { "description": "valid JSON-pointer with empty segment", "data": "/foo//bar", "valid": true, "schema_id": "format_14_0" }, { "description": "valid JSON-pointer with the last empty segment", "data": "/foo/bar/", "valid": true, "schema_id": "format_14_0" }, { "description": "valid JSON-pointer as stated in RFC 6901 #1", "data": "", "valid": true, "schema_id": "format_14_0" }, { "description": "valid JSON-pointer as stated in RFC 6901 #2", "data": "/foo", "valid": true, "schema_id": "format_14_0" }, { "description": "valid JSON-pointer as stated in RFC 6901 #3", "data": "/foo/0", "valid": true, "schema_id": "format_14_0" }, { "description": "valid JSON-pointer as stated in RFC 6901 #4", "data": "/", "valid": true, "schema_id": "format_14_0" }, { "description": "valid JSON-pointer as stated in RFC 6901 #5", "data": "/a~1b", "valid": true, "schema_id": "format_14_0" }, { "description": "valid JSON-pointer as stated in RFC 6901 #6", "data": "/c%d", "valid": true, "schema_id": "format_14_0" }, { "description": "valid JSON-pointer as stated in RFC 6901 #7", "data": "/e^f", "valid": true, "schema_id": "format_14_0" }, { "description": "valid JSON-pointer as stated in RFC 6901 #8", "data": "/g|h", "valid": true, "schema_id": "format_14_0" }, { "description": "valid JSON-pointer as stated in RFC 6901 #9", "data": "/i\\j", "valid": true, "schema_id": "format_14_0" }, { "description": "valid JSON-pointer as stated in RFC 6901 #10", "data": "/k\"l", "valid": true, "schema_id": "format_14_0" }, { "description": "valid JSON-pointer as stated in RFC 6901 #11", "data": "/ ", "valid": true, "schema_id": "format_14_0" }, { "description": "valid JSON-pointer as stated in RFC 6901 #12", "data": "/m~0n", "valid": true, "schema_id": "format_14_0" }, { "description": "valid JSON-pointer used adding to the last array position", "data": "/foo/-", "valid": true, "schema_id": "format_14_0" }, { "description": "valid JSON-pointer (- used as object member name)", "data": "/foo/-/bar", "valid": true, "schema_id": "format_14_0" }, { "description": "valid JSON-pointer (multiple escaped characters)", "data": "/~1~0~0~1~1", "valid": true, "schema_id": "format_14_0" }, { "description": "valid JSON-pointer (escaped with fraction part) #1", "data": "/~1.1", "valid": true, "schema_id": "format_14_0" }, { "description": "valid JSON-pointer (escaped with fraction part) #2", "data": "/~0.1", "valid": true, "schema_id": "format_14_0" }, { "description": "not a valid JSON-pointer (URI Fragment Identifier) #1", "data": "#", "valid": false, "schema_id": "format_14_0" }, { "description": "not a valid JSON-pointer (URI Fragment Identifier) #2", "data": "#/", "valid": false, "schema_id": "format_14_0" }, { "description": "not a valid JSON-pointer (URI Fragment Identifier) #3", "data": "#a", "valid": false, "schema_id": "format_14_0" }, { "description": "not a valid JSON-pointer (some escaped, but not all) #1", "data": "/~0~", "valid": false, "schema_id": "format_14_0" }, { "description": "not a valid JSON-pointer (some escaped, but not all) #2", "data": "/~0/~", "valid": false, "schema_id": "format_14_0" }, { "description": "not a valid JSON-pointer (wrong escape character) #1", "data": "/~2", "valid": false, "schema_id": "format_14_0" }, { "description": "not a valid JSON-pointer (wrong escape character) #2", "data": "/~-1", "valid": false, "schema_id": "format_14_0" }, { "description": "not a valid JSON-pointer (multiple characters not escaped)", "data": "/~~", "valid": false, "schema_id": "format_14_0" }, { "description": "not a valid JSON-pointer (isn't empty nor starts with /) #1", "data": "a", "valid": false, "schema_id": "format_14_0" }, { "description": "not a valid JSON-pointer (isn't empty nor starts with /) #2", "data": "0", "valid": false, "schema_id": "format_14_0" }, { "description": "not a valid JSON-pointer (isn't empty nor starts with /) #3", "data": "a/a", "valid": false, "schema_id": "format_14_0" } ] }, { "description": "validation of regular expressions", "database": { "schemas": [ { "format": "regex", "$id": "format_15_0" } ] }, "tests": [ { "description": "all string formats ignore integers", "data": 12, "valid": true, "schema_id": "format_15_0" }, { "description": "all string formats ignore floats", "data": 13.7, "valid": true, "schema_id": "format_15_0" }, { "description": "all string formats ignore objects", "data": {}, "valid": true, "schema_id": "format_15_0" }, { "description": "all string formats ignore arrays", "data": [], "valid": true, "schema_id": "format_15_0" }, { "description": "all string formats ignore booleans", "data": false, "valid": true, "schema_id": "format_15_0" }, { "description": "all string formats ignore nulls", "data": null, "valid": true, "schema_id": "format_15_0" }, { "description": "a valid regular expression", "data": "([abc])+\\s+$", "valid": true, "schema_id": "format_15_0" }, { "description": "a regular expression with unclosed parens is invalid", "data": "^(abc]", "valid": true, "schema_id": "format_15_0" } ] }, { "description": "validation of Relative JSON Pointers (RJP)", "database": { "schemas": [ { "format": "relative-json-pointer", "$id": "format_16_0" } ] }, "tests": [ { "description": "all string formats ignore integers", "data": 12, "valid": true, "schema_id": "format_16_0" }, { "description": "all string formats ignore floats", "data": 13.7, "valid": true, "schema_id": "format_16_0" }, { "description": "all string formats ignore objects", "data": {}, "valid": true, "schema_id": "format_16_0" }, { "description": "all string formats ignore arrays", "data": [], "valid": true, "schema_id": "format_16_0" }, { "description": "all string formats ignore booleans", "data": false, "valid": true, "schema_id": "format_16_0" }, { "description": "all string formats ignore nulls", "data": null, "valid": true, "schema_id": "format_16_0" }, { "description": "a valid upwards RJP", "data": "1", "valid": true, "schema_id": "format_16_0" }, { "description": "a valid downwards RJP", "data": "0/foo/bar", "valid": true, "schema_id": "format_16_0" }, { "description": "a valid up and then down RJP, with array index", "data": "2/0/baz/1/zip", "valid": true, "schema_id": "format_16_0" }, { "description": "a valid RJP taking the member or index name", "data": "0#", "valid": true, "schema_id": "format_16_0" }, { "description": "an invalid RJP that is a valid JSON Pointer", "data": "/foo/bar", "valid": false, "schema_id": "format_16_0" }, { "description": "negative prefix", "data": "-1/foo/bar", "valid": false, "schema_id": "format_16_0" }, { "description": "explicit positive prefix", "data": "+1/foo/bar", "valid": false, "schema_id": "format_16_0" }, { "description": "## is not a valid json-pointer", "data": "0##", "valid": false, "schema_id": "format_16_0" }, { "description": "zero cannot be followed by other digits, plus json-pointer", "data": "01/a", "valid": false, "schema_id": "format_16_0" }, { "description": "zero cannot be followed by other digits, plus octothorpe", "data": "01#", "valid": false, "schema_id": "format_16_0" }, { "description": "empty string", "data": "", "valid": true, "schema_id": "format_16_0" }, { "description": "multi-digit integer prefix", "data": "120/foo/bar", "valid": true, "schema_id": "format_16_0" } ] }, { "description": "validation of time strings", "database": { "schemas": [ { "format": "time", "$id": "format_17_0" } ] }, "tests": [ { "description": "all string formats ignore integers", "data": 12, "valid": true, "schema_id": "format_17_0" }, { "description": "all string formats ignore floats", "data": 13.7, "valid": true, "schema_id": "format_17_0" }, { "description": "all string formats ignore objects", "data": {}, "valid": true, "schema_id": "format_17_0" }, { "description": "all string formats ignore arrays", "data": [], "valid": true, "schema_id": "format_17_0" }, { "description": "all string formats ignore booleans", "data": false, "valid": true, "schema_id": "format_17_0" }, { "description": "all string formats ignore nulls", "data": null, "valid": true, "schema_id": "format_17_0" }, { "description": "a valid time string", "data": "08:30:06Z", "valid": true, "schema_id": "format_17_0" }, { "description": "invalid time string with extra leading zeros", "data": "008:030:006Z", "valid": false, "schema_id": "format_17_0" }, { "description": "invalid time string with no leading zero for single digit", "data": "8:3:6Z", "valid": false, "schema_id": "format_17_0" }, { "description": "hour, minute, second must be two digits", "data": "8:0030:6Z", "valid": false, "schema_id": "format_17_0" }, { "description": "a valid time string with leap second, Zulu", "data": "23:59:60Z", "valid": true, "schema_id": "format_17_0" }, { "description": "invalid leap second, Zulu (wrong hour)", "data": "22:59:60Z", "valid": false, "schema_id": "format_17_0" }, { "description": "invalid leap second, Zulu (wrong minute)", "data": "23:58:60Z", "valid": false, "schema_id": "format_17_0" }, { "description": "valid leap second, zero time-offset", "data": "23:59:60+00:00", "valid": true, "schema_id": "format_17_0" }, { "description": "invalid leap second, zero time-offset (wrong hour)", "data": "22:59:60+00:00", "valid": false, "schema_id": "format_17_0" }, { "description": "invalid leap second, zero time-offset (wrong minute)", "data": "23:58:60+00:00", "valid": false, "schema_id": "format_17_0" }, { "description": "valid leap second, positive time-offset", "data": "01:29:60+01:30", "valid": true, "schema_id": "format_17_0" }, { "description": "valid leap second, large positive time-offset", "data": "23:29:60+23:30", "valid": true, "schema_id": "format_17_0" }, { "description": "invalid leap second, positive time-offset (wrong hour)", "data": "23:59:60+01:00", "valid": false, "schema_id": "format_17_0" }, { "description": "invalid leap second, positive time-offset (wrong minute)", "data": "23:59:60+00:30", "valid": false, "schema_id": "format_17_0" }, { "description": "valid leap second, negative time-offset", "data": "15:59:60-08:00", "valid": true, "schema_id": "format_17_0" }, { "description": "valid leap second, large negative time-offset", "data": "00:29:60-23:30", "valid": true, "schema_id": "format_17_0" }, { "description": "invalid leap second, negative time-offset (wrong hour)", "data": "23:59:60-01:00", "valid": false, "schema_id": "format_17_0" }, { "description": "invalid leap second, negative time-offset (wrong minute)", "data": "23:59:60-00:30", "valid": false, "schema_id": "format_17_0" }, { "description": "a valid time string with second fraction", "data": "23:20:50.52Z", "valid": true, "schema_id": "format_17_0" }, { "description": "a valid time string with precise second fraction", "data": "08:30:06.283185Z", "valid": true, "schema_id": "format_17_0" }, { "description": "a valid time string with plus offset", "data": "08:30:06+00:20", "valid": true, "schema_id": "format_17_0" }, { "description": "a valid time string with minus offset", "data": "08:30:06-08:00", "valid": true, "schema_id": "format_17_0" }, { "description": "hour, minute in time-offset must be two digits", "data": "08:30:06-8:000", "valid": false, "schema_id": "format_17_0" }, { "description": "a valid time string with case-insensitive Z", "data": "08:30:06z", "valid": true, "schema_id": "format_17_0" }, { "description": "an invalid time string with invalid hour", "data": "24:00:00Z", "valid": false, "schema_id": "format_17_0" }, { "description": "an invalid time string with invalid minute", "data": "00:60:00Z", "valid": false, "schema_id": "format_17_0" }, { "description": "an invalid time string with invalid second", "data": "00:00:61Z", "valid": false, "schema_id": "format_17_0" }, { "description": "an invalid time string with invalid leap second (wrong hour)", "data": "22:59:60Z", "valid": false, "schema_id": "format_17_0" }, { "description": "an invalid time string with invalid leap second (wrong minute)", "data": "23:58:60Z", "valid": false, "schema_id": "format_17_0" }, { "description": "an invalid time string with invalid time numoffset hour", "data": "01:02:03+24:00", "valid": false, "schema_id": "format_17_0" }, { "description": "an invalid time string with invalid time numoffset minute", "data": "01:02:03+00:60", "valid": false, "schema_id": "format_17_0" }, { "description": "an invalid time string with invalid time with both Z and numoffset", "data": "01:02:03Z+00:30", "valid": false, "schema_id": "format_17_0" }, { "description": "an invalid offset indicator", "data": "08:30:06 PST", "valid": false, "schema_id": "format_17_0" }, { "description": "only RFC3339 not all of ISO 8601 are valid", "data": "01:01:01,1111", "valid": false, "schema_id": "format_17_0" }, { "description": "no time offset", "data": "12:00:00", "valid": false, "schema_id": "format_17_0" }, { "description": "no time offset with second fraction", "data": "12:00:00.52", "valid": false, "schema_id": "format_17_0" }, { "description": "invalid non-ASCII '২' (a Bengali 2)", "data": "1২:00:00Z", "valid": false, "schema_id": "format_17_0" }, { "description": "offset not starting with plus or minus", "data": "08:30:06#00:20", "valid": false, "schema_id": "format_17_0" }, { "description": "contains letters", "data": "ab:cd:ef", "valid": false, "schema_id": "format_17_0" }, { "description": "an invalid time string in date-time format", "data": "2020-11-28T23:55:45Z", "valid": false, "schema_id": "format_17_0" } ] }, { "description": "unknown format", "database": { "schemas": [ { "format": "unknown", "$id": "format_18_0" } ] }, "tests": [ { "description": "unknown formats ignore integers", "data": 12, "valid": true, "schema_id": "format_18_0" }, { "description": "unknown formats ignore floats", "data": 13.7, "valid": true, "schema_id": "format_18_0" }, { "description": "unknown formats ignore objects", "data": {}, "valid": true, "schema_id": "format_18_0" }, { "description": "unknown formats ignore arrays", "data": [], "valid": true, "schema_id": "format_18_0" }, { "description": "unknown formats ignore booleans", "data": false, "valid": true, "schema_id": "format_18_0" }, { "description": "unknown formats ignore nulls", "data": null, "valid": true, "schema_id": "format_18_0" }, { "description": "unknown formats ignore strings", "data": "string", "valid": true, "schema_id": "format_18_0" } ] }, { "description": "validation of URI References", "database": { "schemas": [ { "format": "uri-reference", "$id": "format_19_0" } ] }, "tests": [ { "description": "all string formats ignore integers", "data": 12, "valid": true, "schema_id": "format_19_0" }, { "description": "all string formats ignore floats", "data": 13.7, "valid": true, "schema_id": "format_19_0" }, { "description": "all string formats ignore objects", "data": {}, "valid": true, "schema_id": "format_19_0" }, { "description": "all string formats ignore arrays", "data": [], "valid": true, "schema_id": "format_19_0" }, { "description": "all string formats ignore booleans", "data": false, "valid": true, "schema_id": "format_19_0" }, { "description": "all string formats ignore nulls", "data": null, "valid": true, "schema_id": "format_19_0" }, { "description": "a valid URI", "data": "http://foo.bar/?baz=qux#quux", "valid": true, "schema_id": "format_19_0" }, { "description": "a valid protocol-relative URI Reference", "data": "//foo.bar/?baz=qux#quux", "valid": true, "schema_id": "format_19_0" }, { "description": "a valid relative URI Reference", "data": "/abc", "valid": true, "schema_id": "format_19_0" }, { "description": "an invalid URI Reference", "data": "\\\\WINDOWS\\fileshare", "valid": false, "schema_id": "format_19_0" }, { "description": "a valid URI Reference", "data": "abc", "valid": true, "schema_id": "format_19_0" }, { "description": "a valid URI fragment", "data": "#fragment", "valid": true, "schema_id": "format_19_0" }, { "description": "an invalid URI fragment", "data": "#frag\\ment", "valid": false, "schema_id": "format_19_0" }, { "description": "unescaped non US-ASCII characters", "data": "/foobar®.txt", "valid": false, "schema_id": "format_19_0" }, { "description": "invalid backslash character", "data": "https://example.org/foobar\\.txt", "valid": false, "schema_id": "format_19_0" } ] }, { "description": "format: uri-template", "database": { "schemas": [ { "format": "uri-template", "$id": "format_20_0" } ] }, "tests": [ { "description": "all string formats ignore integers", "data": 12, "valid": true, "schema_id": "format_20_0" }, { "description": "all string formats ignore floats", "data": 13.7, "valid": true, "schema_id": "format_20_0" }, { "description": "all string formats ignore objects", "data": {}, "valid": true, "schema_id": "format_20_0" }, { "description": "all string formats ignore arrays", "data": [], "valid": true, "schema_id": "format_20_0" }, { "description": "all string formats ignore booleans", "data": false, "valid": true, "schema_id": "format_20_0" }, { "description": "all string formats ignore nulls", "data": null, "valid": true, "schema_id": "format_20_0" }, { "description": "a valid uri-template", "data": "http://example.com/dictionary/{term:1}/{term}", "valid": true, "schema_id": "format_20_0" }, { "description": "an invalid uri-template", "data": "http://example.com/dictionary/{term:1}/{term", "valid": false, "schema_id": "format_20_0" }, { "description": "a valid uri-template without variables", "data": "http://example.com/dictionary", "valid": true, "schema_id": "format_20_0" }, { "description": "a valid relative uri-template", "data": "dictionary/{term:1}/{term}", "valid": true, "schema_id": "format_20_0" } ] }, { "description": "validation of URIs", "database": { "schemas": [ { "format": "uri", "$id": "format_21_0" } ] }, "tests": [ { "description": "all string formats ignore integers", "data": 12, "valid": true, "schema_id": "format_21_0" }, { "description": "all string formats ignore floats", "data": 13.7, "valid": true, "schema_id": "format_21_0" }, { "description": "all string formats ignore objects", "data": {}, "valid": true, "schema_id": "format_21_0" }, { "description": "all string formats ignore arrays", "data": [], "valid": true, "schema_id": "format_21_0" }, { "description": "all string formats ignore booleans", "data": false, "valid": true, "schema_id": "format_21_0" }, { "description": "all string formats ignore nulls", "data": null, "valid": true, "schema_id": "format_21_0" }, { "description": "a valid URL with anchor tag", "data": "http://foo.bar/?baz=qux#quux", "valid": true, "schema_id": "format_21_0" }, { "description": "a valid URL with anchor tag and parentheses", "data": "http://foo.com/blah_(wikipedia)_blah#cite-1", "valid": true, "schema_id": "format_21_0" }, { "description": "a valid URL with URL-encoded stuff", "data": "http://foo.bar/?q=Test%20URL-encoded%20stuff", "valid": true, "schema_id": "format_21_0" }, { "description": "a valid puny-coded URL ", "data": "http://xn--nw2a.xn--j6w193g/", "valid": true, "schema_id": "format_21_0" }, { "description": "a valid URL with many special characters", "data": "http://-.~_!$&'()*+,;=:%40:80%2f::::::@example.com", "valid": true, "schema_id": "format_21_0" }, { "description": "a valid URL based on IPv4", "data": "http://223.255.255.254", "valid": true, "schema_id": "format_21_0" }, { "description": "a valid URL with ftp scheme", "data": "ftp://ftp.is.co.za/rfc/rfc1808.txt", "valid": true, "schema_id": "format_21_0" }, { "description": "a valid URL for a simple text file", "data": "http://www.ietf.org/rfc/rfc2396.txt", "valid": true, "schema_id": "format_21_0" }, { "description": "a valid URL ", "data": "ldap://[2001:db8::7]/c=GB?objectClass?one", "valid": true, "schema_id": "format_21_0" }, { "description": "a valid mailto URI", "data": "mailto:John.Doe@example.com", "valid": true, "schema_id": "format_21_0" }, { "description": "a valid newsgroup URI", "data": "news:comp.infosystems.www.servers.unix", "valid": true, "schema_id": "format_21_0" }, { "description": "a valid tel URI", "data": "tel:+1-816-555-1212", "valid": true, "schema_id": "format_21_0" }, { "description": "a valid URN", "data": "urn:oasis:names:specification:docbook:dtd:xml:4.1.2", "valid": true, "schema_id": "format_21_0" }, { "description": "an invalid protocol-relative URI Reference", "data": "//foo.bar/?baz=qux#quux", "valid": false, "schema_id": "format_21_0" }, { "description": "an invalid relative URI Reference", "data": "/abc", "valid": false, "schema_id": "format_21_0" }, { "description": "an invalid URI", "data": "\\\\WINDOWS\\fileshare", "valid": false, "schema_id": "format_21_0" }, { "description": "an invalid URI though valid URI reference", "data": "abc", "valid": false, "schema_id": "format_21_0" }, { "description": "an invalid URI with spaces", "data": "http:// shouldfail.com", "valid": false, "schema_id": "format_21_0" }, { "description": "an invalid URI with spaces and missing scheme", "data": ":// should fail", "valid": false, "schema_id": "format_21_0" }, { "description": "an invalid URI with comma in scheme", "data": "bar,baz:foo", "valid": false, "schema_id": "format_21_0" }, { "description": "invalid userinfo", "data": "https://[@example.org/test.txt", "valid": false, "schema_id": "format_21_0" }, { "description": "unescaped non US-ASCII characters", "data": "https://example.org/foobar®.txt", "valid": false, "schema_id": "format_21_0" }, { "description": "invalid backslash character", "data": "https://example.org/foobar\\.txt", "valid": false, "schema_id": "format_21_0" }, { "description": "invalid \" character", "data": "https://example.org/foobar\".txt", "valid": false, "schema_id": "format_21_0" }, { "description": "invalid <> characters", "data": "https://example.org/foobar<>.txt", "valid": false, "schema_id": "format_21_0" }, { "description": "invalid {} characters", "data": "https://example.org/foobar{}.txt", "valid": false, "schema_id": "format_21_0" }, { "description": "invalid ^ character", "data": "https://example.org/foobar^.txt", "valid": false, "schema_id": "format_21_0" }, { "description": "invalid ` character", "data": "https://example.org/foobar`.txt", "valid": false, "schema_id": "format_21_0" }, { "description": "invalid SPACE character", "data": "https://example.org/foo bar.txt", "valid": false, "schema_id": "format_21_0" }, { "description": "invalid | character", "data": "https://example.org/foobar|.txt", "valid": false, "schema_id": "format_21_0" } ] }, { "description": "uuid format", "database": { "schemas": [ { "format": "uuid", "$id": "format_22_0" } ] }, "tests": [ { "description": "all string formats ignore integers", "data": 12, "valid": true, "schema_id": "format_22_0" }, { "description": "all string formats ignore floats", "data": 13.7, "valid": true, "schema_id": "format_22_0" }, { "description": "all string formats ignore objects", "data": {}, "valid": true, "schema_id": "format_22_0" }, { "description": "all string formats ignore arrays", "data": [], "valid": true, "schema_id": "format_22_0" }, { "description": "all string formats ignore booleans", "data": false, "valid": true, "schema_id": "format_22_0" }, { "description": "all string formats ignore nulls", "data": null, "valid": true, "schema_id": "format_22_0" }, { "description": "all upper-case", "data": "2EB8AA08-AA98-11EA-B4AA-73B441D16380", "valid": true, "schema_id": "format_22_0" }, { "description": "all lower-case", "data": "2eb8aa08-aa98-11ea-b4aa-73b441d16380", "valid": true, "schema_id": "format_22_0" }, { "description": "mixed case", "data": "2eb8aa08-AA98-11ea-B4Aa-73B441D16380", "valid": true, "schema_id": "format_22_0" }, { "description": "all zeroes is valid", "data": "00000000-0000-0000-0000-000000000000", "valid": true, "schema_id": "format_22_0" }, { "description": "wrong length", "data": "2eb8aa08-aa98-11ea-b4aa-73b441d1638", "valid": false, "schema_id": "format_22_0" }, { "description": "missing section", "data": "2eb8aa08-aa98-11ea-73b441d16380", "valid": false, "schema_id": "format_22_0" }, { "description": "bad characters (not hex)", "data": "2eb8aa08-aa98-11ea-b4ga-73b441d16380", "valid": false, "schema_id": "format_22_0" }, { "description": "no dashes", "data": "2eb8aa08aa9811eab4aa73b441d16380", "valid": false, "schema_id": "format_22_0" }, { "description": "too few dashes", "data": "2eb8aa08aa98-11ea-b4aa73b441d16380", "valid": false, "schema_id": "format_22_0" }, { "description": "too many dashes", "data": "2eb8-aa08-aa98-11ea-b4aa73b44-1d16380", "valid": false, "schema_id": "format_22_0" }, { "description": "dashes in the wrong spot", "data": "2eb8aa08aa9811eab4aa73b441d16380----", "valid": false, "schema_id": "format_22_0" }, { "description": "shifted dashes", "data": "2eb8aa0-8aa98-11e-ab4aa7-3b441d16380", "valid": false, "schema_id": "format_22_0" }, { "description": "valid version 4", "data": "98d80576-482e-427f-8434-7f86890ab222", "valid": true, "schema_id": "format_22_0" }, { "description": "valid version 5", "data": "99c17cbb-656f-564a-940f-1a4568f03487", "valid": true, "schema_id": "format_22_0" }, { "description": "hypothetical version 6", "data": "99c17cbb-656f-664a-940f-1a4568f03487", "valid": true, "schema_id": "format_22_0" }, { "description": "hypothetical version 15", "data": "99c17cbb-656f-f64a-940f-1a4568f03487", "valid": true, "schema_id": "format_22_0" } ] }, { "description": "period format", "database": { "schemas": [ { "format": "period", "$id": "format_23_0" } ] }, "tests": [ { "description": "valid period (start/duration)", "data": "2020-01-01T00:00:00Z/P1Y", "valid": true, "schema_id": "format_23_0" }, { "description": "valid period (duration/end)", "data": "P1Y/2021-01-01T00:00:00Z", "valid": true, "schema_id": "format_23_0" }, { "description": "valid period (start/end)", "data": "2020-01-01T00:00:00Z/2021-01-01T00:00:00Z", "valid": true, "schema_id": "format_23_0" }, { "description": "invalid period (missing slash)", "data": "2020-01-01T00:00:00ZP1Y", "valid": false, "schema_id": "format_23_0" }, { "description": "ignores non-strings", "data": 123, "valid": true, "schema_id": "format_23_0" } ] } ]