Skip to content
JSON2026-08-282 min read

Symptom: validation fails, error points at required

You validate some JSON and the Schema returns something like:

{
  "keyword": "required",
  "message": "should have required property 'email'",
  "missingProperty": "email"
}

It means: the Schema requires an email field, but your data doesn't have it. Sounds simple, but "I clearly wrote it yet it's still missing" is common.

Why "written but still missing"

1. Field name typo / case mismatch

The Schema wants email; your data has Email or e-mail — JSON field names are case-sensitive, one character off counts as missing.

2. Wrong nesting level

required applies to the object at its own level. For example:

{
  "type": "object",
  "properties": {
    "user": {
      "type": "object",
      "required": ["email"],
      "properties": { "email": { "type": "string" } }
    }
  }
}

Here required: ["email"] only constrains the user sub-object, not the top level. If your email is at the top level, it reports missing.

3. Forgot to wrap array items

Each element of an array must satisfy the Schema in items. A common mistake is putting required on the array itself instead of on the object inside items.

The additionalProperties trap

If you set "additionalProperties": false, then any field not declared in the Schema also errors (not just missing — extra fields too). During debugging, set it to true or comment it out first, then tighten later.

How to locate step by step

Open the JSON Schema Validator on ToolVault:

  1. Paste JSON data on the left, Schema on the right;
  2. Click validate — the tool lists all errors (not just the first) and shows the path, e.g. user.email;
  3. Check the path: typo, wrong level, or wrong type;
  4. First format both data and Schema with the JSON Formatter so nesting is clear at a glance.

FAQ

Multiple required missing, but only one reported?

A strict validator may stop at the first; our tool lists all errors so you can fix them in one pass.

Does a wrong type also report as required?

No. Type errors are reported by the type keyword (should be string), independent from required. The keyword field tells them apart.

Can I make "pick one of two required"?

Yes — wrap two required sets in oneOf or anyOf, more flexible than a bare required.


Provided by ToolVault. Related tools: JSON Schema Validator, JSON Formatter, JSON Diff. Visit the home page for more developer tools.


Advertisement