...

Text file src/github.com/qri-io/jsonschema/testdata/draft7/pattern.json

Documentation: github.com/qri-io/jsonschema/testdata/draft7

     1[
     2    {
     3        "description": "pattern validation",
     4        "schema": {"pattern": "^a*$"},
     5        "tests": [
     6            {
     7                "description": "a matching pattern is valid",
     8                "data": "aaa",
     9                "valid": true
    10            },
    11            {
    12                "description": "a non-matching pattern is invalid",
    13                "data": "abc",
    14                "valid": false
    15            },
    16            {
    17                "description": "ignores non-strings",
    18                "data": true,
    19                "valid": true
    20            }
    21        ]
    22    },
    23    {
    24        "description": "pattern is not anchored",
    25        "schema": {"pattern": "a+"},
    26        "tests": [
    27            {
    28                "description": "matches a substring",
    29                "data": "xxaayy",
    30                "valid": true
    31            }
    32        ]
    33    }
    34]

View as plain text