request node validates incoming request data against a schema. Use it at the start of flows to ensure data meets requirements before processing.
Configuration
Config Fields
| Field | Type | Required | Description |
|---|---|---|---|
source | string | Yes | Context path to validate (e.g., request.body, request.query) |
schema | object | Yes | Field-to-rules mapping |
on_error | object | No | Custom error handling |
on_error Config
| Field | Type | Default | Description |
|---|---|---|---|
action | string | "abort" | "abort" or "continue" |
status | number | 400 | HTTP status code for abort |
body | object | - | Custom error response body |
Output
On Success
On Failure
Validation Rules
Rules are separated by| (pipe). Some rules accept parameters after : (colon).
Presence Rules
| Rule | Description |
|---|---|
required | Field must be present and not empty |
nullable | Field can be null |
present | Field must exist (can be empty) |
sometimes | Only validate if field exists |
Conditional Required
| Rule | Description |
|---|---|
required_if:field,value | Required if another field equals value |
required_unless:field,value | Required unless another field equals value |
required_with:field | Required if another field is present |
required_without:field | Required if another field is absent |
required_with_all:field1,field2 | Required if all listed fields present |
required_without_all:field1,field2 | Required if all listed fields absent |
Type Rules
| Rule | Description |
|---|---|
string | Must be a string |
integer | Must be an integer |
numeric | Must be a number |
boolean | Must be true or false |
array | Must be an array |
object | Must be an object |
Size Rules
| Rule | Description |
|---|---|
min:n | Minimum value/length/count |
max:n | Maximum value/length/count |
size:n | Exact value/length/count |
between:min,max | Value/length/count between range |
Format Rules
| Rule | Description |
|---|---|
email | Valid email format |
url | Valid URL format |
uuid | Valid UUID format |
ip | Valid IP address |
ipv4 | Valid IPv4 address |
ipv6 | Valid IPv6 address |
json | Valid JSON string |
regex:pattern | Matches regex pattern |
Date Rules
| Rule | Description |
|---|---|
date | Valid date format |
datetime | Valid datetime format |
before:date | Must be before date |
after:date | Must be after date |
before_or_equal:date | Must be before or equal to date |
after_or_equal:date | Must be after or equal to date |
Comparison Rules
| Rule | Description |
|---|---|
same:field | Must match another field |
different:field | Must differ from another field |
confirmed | Must have matching field_confirmation |
gt:field | Greater than another field |
gte:field | Greater than or equal to another field |
lt:field | Less than another field |
lte:field | Less than or equal to another field |
Inclusion Rules
| Rule | Description |
|---|---|
in:val1,val2,val3 | Must be one of listed values |
not_in:val1,val2,val3 | Must not be one of listed values |
Control Rules
| Rule | Description |
|---|---|
bail | Stop validating field on first failure |
Examples
User Registration
Product Creation
Array Validation
Use.* wildcard to validate array items:
Optional Fields
Custom Error Response
Continue on Error
Capture validation errors without aborting:Error Response Context
In custom error body templates, these variables are available:| Variable | Description |
|---|---|
{{validation_errors}} | Array of all error objects |
{{validation_errors_map}} | Map of field to first error message |
{{first_error}} | First error message |
{{error_count}} | Total number of errors |
Default Error Response
Without customon_error.body:
Related
- Validation Rules Reference - Complete rules documentation
- Transform Node - Transform validated data
- Condition Node - Branch based on validation