Skip to main content

Validate Node

Validates input data against a JSON schema and branches valid/invalid.

Config vs inputs (code-grounded)

  • config.schema: required JSON Schema object
  • inputs.value: value to validate (often expression-based)

Outputs/branches

  • Uses matched_output.
  • valid when schema validation passes.
  • invalid when validation fails, usually with error details.

Example usage snippet

{
"id": "n_validate",
"type": "validate_node",
"inputs": {
"value": "{{ $json['http_trigger'].request.body }}"
},
"config": {
"schema": {
"type": "object",
"required": ["email"],
"properties": {
"email": { "type": "string" }
}
}
}
}

Common pitfalls

  • Putting value under config.input; runtime reads inputs.value.
  • Forgetting to handle invalid branch with user-friendly response.
  • Using permissive schemas that do not enforce required fields.