github.com/kaptinlin/jsonschema@v0.4.6/testdata/JSON-Schema-Test-Suite/tests/draft2019-09/maxLength.json (about)

     1  [
     2      {
     3          "description": "maxLength validation",
     4          "schema": {
     5              "$schema": "https://json-schema.org/draft/2019-09/schema",
     6              "maxLength": 2
     7          },
     8          "tests": [
     9              {
    10                  "description": "shorter is valid",
    11                  "data": "f",
    12                  "valid": true
    13              },
    14              {
    15                  "description": "exact length is valid",
    16                  "data": "fo",
    17                  "valid": true
    18              },
    19              {
    20                  "description": "too long is invalid",
    21                  "data": "foo",
    22                  "valid": false
    23              },
    24              {
    25                  "description": "ignores non-strings",
    26                  "data": 100,
    27                  "valid": true
    28              },
    29              {
    30                  "description": "two graphemes is long enough",
    31                  "data": "\uD83D\uDCA9\uD83D\uDCA9",
    32                  "valid": true
    33              }
    34          ]
    35      },
    36      {
    37          "description": "maxLength validation with a decimal",
    38          "schema": {
    39              "$schema": "https://json-schema.org/draft/2019-09/schema",
    40              "maxLength": 2.0
    41          },
    42          "tests": [
    43              {
    44                  "description": "shorter is valid",
    45                  "data": "f",
    46                  "valid": true
    47              },
    48              {
    49                  "description": "too long is invalid",
    50                  "data": "foo",
    51                  "valid": false
    52              }
    53          ]
    54      }
    55  ]