Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • brand
  • model
  • color
  • date
Code Block
languagejs
{
  "required": [
    "brand",
    "color",
    "model",
    "date"
  ],
  "properties": {
    "value": {
      "type": "string",
      "minLength": 2,
      "maxLength": 3
    }
  }
}

The following record matches all of the criteria:

Code Block
languagejs
{
    "brand": "brand1",
    "model": "modelA",
    "color": "red",
    "date":  "20 March 2019",
    "value": "cat" 
}

The following record is discarded because hamster has more than 3 characters:

Code Block
languagejs
{
    "brand": "brand1",
    "model": "modelA",
    "color": "red",
    "date":  "20 March 2019",
    "value": "hamster" 
}

...