Skip to content

Validation of required properties is not working properly #3

@niho

Description

@niho

Problem

It seems like properties that is listed in the required list, but is not present in the properties will be ignored by the validation. This makes the validated data not properly valid in accordance with the JSON Schema standard, and will fail validation with other validators.

How to reproduce

Example of a schema that reproduces the problem:

{
  "$schema": "http://json-schema.org/schema#",
  "required": [
    "title",
    "description"
  ],
  "properties": {
    "title": {
      "type": "string"
    }
  }
}

The above schema requires both a title and a description property to be present (while the schema for the description property is unspecified). But the json-schema-form validator will simply ignore the description property.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions