younifyd
Menu

Validate Schema

Validate data against JSON Schema. Returns error response if validation fails.

Use it in a workflow

  1. Add a step and choose the Schema Validator connector.
  2. Pick the Validate Schema action (under validation).
  3. Fill in the fields below, then reference the result from later steps as {{validateSchema.response.data}}.

Fields

datastringrequired

The data to validate against the schema. Can reference previous steps using {{stepName.output}}

schemastringrequired

JSON Schema to validate against (JSON Schema Draft 7 or later)

errorResponseobject

Configure the response when validation fails. If not provided, default error response will be used.

statusnumber

HTTP status code to return when validation fails (default: 400)

Default 400

bodystring

Response body when validation fails. Can use {{errors}} to include validation errors.

headerskeyvalue

HTTP headers to include in error response

Examples

Validate a webhook payload

Require a name (string) and age (positive number) before letting the workflow continue

json
{
  "data": "{{trigger.body}}",
  "schema": "{\"type\": \"object\", \"properties\": {\"name\": {\"type\": \"string\"}, \"age\": {\"type\": \"number\", \"minimum\": 0}}, \"required\": [\"name\", \"age\"]}"
}

Need more? See the Schema Validator guide for connection setup and behaviour shared by every action.

Was this page helpful?