---
title: "fields · RUAL Documentation"
description: "Runs the given function per field for easier validation. By default it makes a field required. Function return values can be condition, value (error)"
canonical: https://docs.rual.nl/block-types/http%20connection/httpconnection_fieldvalidation
language: en
---

[Cluster](https://docs.rual.nl/cluster)

[Blocks](https://docs.rual.nl/block-types)

[Interfaces](https://docs.rual.nl/interfaces)

[Blueprints](https://docs.rual.nl/blueprints)

[Tutorials](https://docs.rual.nl/tutorials)

[Home automation](https://docs.rual.nl/home-automation)

[Examples](https://docs.rual.nl/examples)

[Reference](https://docs.rual.nl/reference)

[Architecture](https://docs.rual.nl/architecture)

[Troubleshooting](https://docs.rual.nl/troubleshooting)

Other

# fields

This block is part of the [`http connection`](https://docs.rual.nl/block-types/http%20connection) group and was last modified in core [`v10.4.28`](https://docs.rual.nl/core-versions/100428).

## Fields Selection Required

This block relies on fields that you selected to perform its data actions. You must manually select the fields you want to use in your flow using the fields selector modal. To access the modal, click the white button on the block.

## Field Selection Required

This block requires field selection (in). You must manually select the fields you want to work with using the field selector modal. To access the modal, click the white button on the block.

Runs the given function per field for easier validation. By default it makes a field required. Function return values can be `condition, value (error)`

- flow `flow`

- connection required `httpconnection`

- flow `flow`

- connection `httpconnection`

- valid `condition` Returns true if all valed

- fields `array` All fields that returned an error

- errors `array` All errors as returned by the running functions.

Validates request-body fields: for each selected field it reads the value from the body via dot-notation and, when a validator function is wired to that field's pin, runs it with key and value pins : the function's error or description output marks the field invalid, its condition or boolean output decides validity directly. A field WITHOUT a wired function is only checked for presence: nil value -> FIELD_MISSING error. Outputs no_errors (true when every field passed), error_fields (the failing field names), and errors (one {description, success, key, type} object per failure).

A typical wiring for [fields](https://docs.rual.nl/block-types/http%2520connection/httpconnection_fieldvalidation): a [function trigger](https://docs.rual.nl/block-types/globals/trigger_custom_function) starts the flow; the `flow` out pin feeds [debug](https://docs.rual.nl/block-types/state%2520ui/state_debug).

[![Studio canvas example for the fields block: typical wiring for fields.](https://docs.rual.nl/canvas-examples/httpconnection_fieldvalidation.png)](https://docs.rual.nl/canvas-examples/httpconnection_fieldvalidation.png?v=3)

## Version history

Introduced in [`v10.4.28`](https://docs.rual.nl/core-versions/100428).

- [Back to `http connection`](https://docs.rual.nl/block-types/http%20connection): Return to the main group to view all sub-groups

- [Back to `validation`](https://docs.rual.nl/block-types/http%20connection?group=validation): Return to the group to view all blocks within this group

Was this page helpful? [Tell us what to improve](https://docs.rual.nl/support) · RUAL Docs is an integral component of the [RUAL ecosystem](https://rual.nl)
