Skip to main content
The request node uses validation rules to verify incoming data. Rules are specified as pipe-separated strings.

Syntax

Presence Rules

Control when fields are required.

required

Field must be present and not empty.

nullable

Field can be null. If present and not null, other rules apply.

present

Field must exist in input (can be empty/null).

sometimes

Only validate if field exists.

Conditional Required

Make fields conditionally required.

required_if

Required when another field equals a value.

required_unless

Required unless another field equals a value.

required_with

Required when another field is present.

required_without

Required when another field is absent.

required_with_all

Required when all specified fields are present.

required_without_all

Required when all specified fields are absent.

Type Rules

Validate data types.

string

Must be a string.

integer

Must be an integer (no decimals).

numeric

Must be a number (integer or float).

boolean

Must be true or false.

array

Must be an array.

object

Must be an object.

Size Rules

Validate size, length, or value. Size rules behave differently based on the field type:
  • Strings: Validates character length
  • Numbers: Validates the numeric value
  • Arrays: Validates item count

min

Minimum size/length/value.

max

Maximum size/length/value.

size

Exact size/length/value.

between

Value/length must be in range.

Format Rules

Validate string formats.

email

Valid email address format.

url

Valid URL format.

uuid

Valid UUID format.

ip

Valid IP address (v4 or v6).

ipv4

Valid IPv4 address.

ipv6

Valid IPv6 address.

json

Valid JSON string.

regex

Matches regular expression pattern.

Date Rules

Validate date values.

date

Valid date format.

datetime

Valid datetime format.

before

Date must be before specified date.

after

Date must be after specified date.

before_or_equal

Date must be before or equal to specified date.

after_or_equal

Date must be after or equal to specified date.

File Rules

Validate uploaded files. These rules work with files uploaded via multipart/form-data requests.

file

Must be an uploaded file.

image

Must be an image file (jpeg, png, gif, bmp, webp).

mimes

Must be one of the specified MIME types.

extensions

Must have one of the specified file extensions.

dimensions

Image dimension constraints. Only applies to image files.
Dimension Constraints: Examples:

Comparison Rules

Compare fields to each other.

same

Must match another field’s value.

different

Must differ from another field’s value.

confirmed

Field must have a matching _confirmation field.
This expects an email_confirmation field with the same value.

gt

Greater than another field.

gte

Greater than or equal to another field.

lt

Less than another field.

lte

Less than or equal to another field.

Inclusion Rules

Validate against a list of values.

in

Must be one of the specified values.

not_in

Must not be one of the specified values.

Control Rules

Control validation behavior.

bail

Stop validating the field on first error.
Without bail, all rules are checked. With bail, validation stops at first failure.

Array Validation

Validate nested array items using .* wildcard.

Basic Array Items

Object Array Items

Nested Array Validation

Complete Examples

User Registration

Product Creation

Order Placement

Profile Update

File Upload

Document Upload with Metadata

Combined with file validation:

Error Messages

Each rule generates a specific error message: