[
    {
        "description": "Sanity check: validation of date-time strings",
        "schema": {"format": "date-time"},
        "tests": [
            {
                "description": "a valid date-time string",
                "data": "1963-06-19T08:30:06.283185Z",
                "valid": true
            },
            {
                "description": "an invalid date-time string",
                "data": "06/19/1963 08:30:06 PST",
                "valid": false
            },
            {
                "description": "only RFC3339 not all of ISO 8601 are valid",
                "data": "2013-350T01:01:01",
                "valid": false
            }
        ]
    },
    {
        "description": "validation of date strings",
        "schema": {"format": "date"},
        "tests": [
            {
                "description": "a valid date string",
                "data": "1963-06-19",
                "valid": true
            },
            {
                "description": "invalid month in date",
                "data": "1963-13-19",
                "valid": false
            },
            {
                "description": "invalid day in date",
                "data": "1963-12-39",
                "valid": false
            },
            {
                "description": "invalid year in date",
                "data": "63-12-39",
                "valid": false
            },
            {
                "description": "invalid leap year date",
                "data": "1999-02-29",
                "valid": false
            },
            {
                "description": "date does not validate date-time",
                "data": "1963-06-19T08:30:06.283185Z",
                "valid": false
            },
            {
                "description": "invalid date",
                "data": "2013-350T01:01:01",
                "valid": false
            },
            {
                "description": "an invalid date string",
                "data": "06/19/1963",
                "valid": false
            },
            {
                "description": "only RFC3339 not all of ISO 8601 are valid",
                "data": "2013-350T01:01:01",
                "valid": false
            }
        ]
    },
    {
        "description": "sanity check: validation of URIs (literally from json schema test suite)",
        "schema": {"format": "uri"},
        "tests": [
            {
                "description": "a valid URI",
                "data": "http://foo.bar/?baz=qux#quux",
                "valid": true
            },
            {
                "description": "an invalid URI",
                "data": "\\\\WINDOWS\\fileshare",
                "valid": false
            },
            {
                "description": "an invalid URI though valid URI reference",
                "data": "abc",
                "valid": false
            }
        ]
    },
    {
        "description": "sanity check: validation of e-mail addresses (literally from json schema test suite)",
        "schema": {"format": "email"},
        "tests": [
            {
                "description": "a valid e-mail address",
                "data": "joe.bloggs@example.com",
                "valid": true
            },
            {
                "description": "an invalid e-mail address",
                "data": "2962",
                "valid": false
            }
        ]
    },
    {
        "description": "sanity check: validation of IP addresses (literally from json schema test suite)",
        "schema": {"format": "ipv4"},
        "tests": [
            {
                "description": "a valid IP address",
                "data": "192.168.0.1",
                "valid": true
            },
            {
                "description": "an IP address with too many components",
                "data": "127.0.0.0.1",
                "valid": false
            },
            {
                "description": "an IP address with out-of-range values",
                "data": "256.256.256.256",
                "valid": false
            },
            {
                "description": "an IP address without 4 components",
                "data": "127.0",
                "valid": false
            },
            {
                "description": "an IP address as an integer",
                "data": "0x7f000001",
                "valid": false
            }
        ]
    },
    {
        "description": "sanity check: validation of IPv6 addresses (literally from json schema test suite)",
        "schema": {"format": "ipv6"},
        "tests": [
            {
                "description": "a valid IPv6 address",
                "data": "::1",
                "valid": true
            },
            {
                "description": "an IPv6 address with out-of-range values",
                "data": "12345::",
                "valid": false
            },
            {
                "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
            },
            {
                "description": "an IPv6 address containing illegal characters",
                "data": "::laptop",
                "valid": false
            }
        ]
    },
    {
        "description": "sanity check: validation of host names (literally from json schema test suite)",
        "schema": {"format": "hostname"},
        "tests": [
            {
                "description": "a valid host name",
                "data": "www.example.com",
                "valid": true
            },
            {
                "description": "a host name starting with an illegal character",
                "data": "-a-host-name-that-starts-with--",
                "valid": false
            },
            {
                "description": "a host name containing illegal characters",
                "data": "not_a_valid_host_name",
                "valid": false
            },
            {
                "description": "a host name with a component too long",
                "data": "a-vvvvvvvvvvvvvvvveeeeeeeeeeeeeeeerrrrrrrrrrrrrrrryyyyyyyyyyyyyyyy-long-host-name-component",
                "valid": false
            }
        ]
    },
    {
        "description": "validation of duration strings",
        "schema": {"format": "duration"},
        "tests": [
            {
                "description": "a valid duration string",
                "data": "1ns",
                "valid": true
            },
            {
                "description": "a valid duration string",
                "data": "1min",
                "valid": true
            },
            {
                "description": "a valid duration string",
                "data": "1wk",
                "valid": true
            },
            {
                "description": "a valid duration string",
                "data": "3week",
                "valid": true
            },
            {
                "description": "a valid duration string",
                "data": "3 week",
                "valid": true
            },
            {
                "description": "a valid duration string",
                "data": "3 weeks",
                "valid": true
            },
            {
                "description": "a valid duration string",
                "data": "three weeks",
                "valid": false
            },
            {
                "description": "an invalid duration string",
                "data": "06/19/1963 08:30:06 PST",
                "valid": false
            },
            {
                "description": "an invalid duration string",
                "data": "06/19/1963 08:30:06 PST",
                "valid": false
            },
            {
                "description": "an invalid duration string",
                "data": "zorg",
                "valid": false
            }
        ]
    },
    {
        "description": "validation of MAC address strings",
        "schema": {"format": "mac"},
        "tests": [
            {
                "description": "a valid MAC address string",
                "data": "01:02:03:04:05:06",
                "valid": true
            },
            {
                "description": "a valid MAC address string",
                "data": "AE:02:03:04:05:06",
                "valid": true
            },
            {
                "description": "an invalid MAC address string",
                "data": "01:02:03:0G:05:06",
                "valid": false
            },
            {
                "description": "an invalid MAC address string",
                "data": "01:02:03:04:05:06:07",
                "valid": false
            }
        ]
    },
    {
        "description": "validation of uuid strings",
        "schema": {"format": "uuid"},
        "tests": [
            {
                "description": "a valid uuid",
                "data": "a8098c1a-f86e-11da-bd1a-00112444be1e",
                "valid": true
            },
            {
                "description": "an invalid uuid",
                "data": "a8098c1a+f86e+11da+bd1a+00112444be1e",
                "valid": false
            }
        ]
    },
    {
        "description": "validation of uuid3 strings",
        "schema": {"format": "uuid3"},
        "tests": [
            {
                "description": "a valid uuid3",
                "data": "bcd02e22-68f0-3046-a512-327cca9def8f",
                "valid": true
            },
            {
                "description": "an invalid uuid3",
                "data": "not-an-uuid3",
                "valid": false
            },
            {
                "description": "an invalid uuid3",
                "data": "bcg02e22-68f0-3046-a512-327cca9def8f",
                "valid": false
            }
        ]
    },
    {
        "description": "validation of uuid4 strings",
        "schema": {"format": "uuid4"},
        "tests": [
            {
                "description": "a valid uuid4",
                "data": "025b0d74-00a2-4048-bf57-227c5111bb34",
                "valid": true
            },
            {
                "description": "an invalid uuid4",
                "data": "not-an-uuid4",
                "valid": false
            },
            {
                "description": "an invalid uuid4",
                "data": "025b0d74-00a2-4048-bf57-227x5111bb34",
                "valid": false
            }
        ]
    },
    {
        "description": "validation of uuid5 strings",
        "schema": {"format": "uuid5"},
        "tests": [
            {
                "description": "a valid uuid5",
                "data": "886313e1-3b8a-5372-9b90-0c9aee199e5d",
                "valid": true
            },
            {
                "description": "an invalid uuid5",
                "data": "886313e1/3b8a-5372/9b90/0c9aee199e5d",
                "valid": false
            },
            {
                "description": "an invalid uuid5",
                "data": "886313h1-3b8a-5372-9b90-0c9aee199e5d",
                "valid": false
            }
        ]
    },
    {
        "description": "test password format (pass-through)",
        "schema": {"format": "password"},
        "tests": [
            {
                "description": "a valid password",
                "data": "secret",
                "valid": true
            }
        ]
    },
    {
        "description": "validation of ISBN strings",
        "schema": {"format": "isbn"},
        "tests": [
            {
                "description": "a valid ISBN",
                "data": "0321751043",
                "valid": true
            },
            {
                "description": "an invalid ISBN",
                "data": "03217510X3",
                "valid": false
            }
        ]
    },
    {
        "description": "validation of ISBN10 strings",
        "schema": {"format": "isbn10"},
        "tests": [
            {
                "description": "a valid ISBN10",
                "data": "0321751043",
                "valid": true
            },
            {
                "description": "an invalid ISBN10",
                "data": "032175104300000500",
                "valid": false
            }
        ]
    },
    {
        "description": "validation of ISBN13 strings",
        "schema": {"format": "isbn13"},
        "tests": [
            {
                "description": "a valid ISBN13",
                "data": "978 3401013190",
                "valid": true
            },
            {
                "description": "an invalid ISBN13",
                "data": "032175104300000500",
                "valid": false
            }
        ]
    },
    {
        "description": "validation of creditcard strings",
        "schema": {"format": "creditcard"},
        "tests": [
            {
                "description": "a valid creditcard",
                "data": "4111-1111-1111-1111",
                "valid": true
            },
            {
                "description": "an invalid creditcard",
                "data": "4111-1111-1111-11A1",
                "valid": false
            }
        ]
    },
    {
        "description": "validation of SSN strings",
        "schema": {"format": "ssn"},
        "tests": [
            {
                "description": "a valid SSN",
                "data": "111-11-1111",
                "valid": true
            },
            {
                "description": "an invalid SSN",
                "data": "111-111111",
                "valid": false
            }
        ]
    },
    {
        "description": "validation of hexcolor string",
        "schema": {"format": "hexcolor"},
        "tests": [
            {
                "description": "a valid hexcolor",
                "data": "#FFFFFF",
                "valid": true
            },
            {
                "description": "an invalid hexcolor",
                "data": "xFFFFFF",
                "valid": false
            }
        ]
    },
    {
        "description": "validation of RGB color strings",
        "schema": {"format": "rgbcolor"},
        "tests": [
            {
                "description": "a valid rgbcolor",
                "data": "rgb(255,255,255)",
                "valid": true
            },
            {
                "description": "an invalid rgbcolor",
                "data": "rgb(100,100)",
                "valid": false
            }
        ]
    },
    {
        "description": "validation of base64 strings",
        "schema": {"format": "byte"},
        "tests": [
            {
                "description": "a valid byte (base64)",
                "data": "ZWxpemFiZXRocG9zZXk=",
                "valid": true
            },
            {
                "description": "an invalid byte (base64)",
                "data": "ZWxpemFiZXRocG9zZXk",
                "valid": false
            }
        ]
    },
    {
        "description": "validation of BSON object ID strings",
        "schema": {"format": "bsonobjectid"},
        "tests": [
            {
                "description": "a valid bsonobjectid",
                "data": "507f1f77bcf86cd799439011",
                "valid": true
            },
            {
                "description": "an invalid bsonobjectid",
                "data": "x07f1f77bcf86cd799439011",
                "valid": false
            }
        ]
    },
    {
        "description": "validation of unsupported format (pass-through)",
        "schema": {"format": "unsupported"},
        "tests": [
            {
                "description": "an invalid format (no validation)",
                "data": "my string",
                "valid": true
            }
        ]
    }
]
