---
title: "web form errors · RUAL Documentation"
description: "Shows validation messages next to the fields of the form that sent the action. The browser clears a message as soon as the field is edited."
canonical: https://docs.rual.nl/block-types/web/web_errors
language: en
---

# web form errors

This block is part of the [`web`](https://docs.rual.nl/block-types/web) group and was last modified in core [`v15.0.1`](https://docs.rual.nl/core-versions/150001).

Shows validation messages next to the fields of the form that sent the action. The browser clears a message as soon as the field is edited.

- flow

- errors `object` Field name → message.

- message `value` A message for the whole form.

- form `value` A CSS selector for the form, when not the one that sent the action.

- flow

Adds a browser update to the web action's answer: for every {field name: message} in `errors` the form's field gets aria-invalid and the message is written into the element [data-error-for="<name>"] in the form (created after the field when missing); `message` goes to [data-error-for="_form"]. Empty messages are dropped; an empty errors object clears earlier messages. The form is the one that sent the action unless `target` selects another. Only in a flow started by web_action. The browser runtime also checks required/minlength/pattern/type=email itself before sending, so the server only sees forms that pass those.

| `validation errors` |
| --- |
| `field errors` |
| `form validation` |

The browser checks required fields and formats itself, so the action only has to check what the server alone can know. The email from the form feeds a [search single](https://docs.rual.nl/block-types/storage/function_search_single_result), and when it finds a subscriber the [branch](https://docs.rual.nl/block-types/flow/branch) runs [web form errors](https://docs.rual.nl/block-types/web/web_errors). Its errors pin is an object of field name to message, built here with [key -> value](https://docs.rual.nl/block-types/object/object_keyvalue), and the browser writes the message next to that field of the form that sent the action. The message pin is for the form as a whole. The false pin of the branch would carry on and store the address.

[![Studio canvas example for the web form errors block: refusing an address that is already on the list.](https://docs.rual.nl/canvas-examples/web_errors.png)](https://docs.rual.nl/canvas-examples/web_errors.png?v=3)

## Used in these guides

These documentation pages use or explain this block:

- [Building a Login Page](https://docs.rual.nl/tutorials/login-page)

- [File Upload & Processing](https://docs.rual.nl/tutorials/file-upload-processing)

- [Block Execution](https://docs.rual.nl/blueprints/block-execution)

- [Common Blueprint Patterns](https://docs.rual.nl/blueprints/common-patterns)

- [Forms and Validation](https://docs.rual.nl/web/forms)

- [Markup Reference](https://docs.rual.nl/web/markup)

- [Migrating from State Pages](https://docs.rual.nl/web/migrate-from-state-pages)

- [Tutorial: A Small Webshop](https://docs.rual.nl/web/build-a-shop)

## Version history

Introduced in [`v15.0.1`](https://docs.rual.nl/core-versions/150001).

- [`v15.0.1`](https://docs.rual.nl/core-versions/150001): block added in this release.

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

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