For the complete documentation index, see llms.txt. This page is also available as Markdown.

Creating validators

Validators check what someone types into a form field in a business application, at the moment they type it, and record whether the entry matched the rule.

A validator is a set of rules attached to one form in a business application. It checks what someone types into a form field and tells them, on the spot, whether the entry matches the rule. It runs in the browser, layered over the application, so the application's own code and error messages stay untouched.

Inside a validator sits one validation for each field being checked. A validation is a single rule plus the hint the person filling in the form reads. The rule is either a pattern, generated from a plain-language description, or a check that the field is not left empty. One validator holds as many validations as the form needs, published together.

A validator also points at the form's existing submit button, called the completion button. That is how Userlane knows a form was sent, which makes it possible to report on entries as a submission.

A form field with a validator hint shown beside it
A validator hint on a form field.

When to use a validator

A validator fits an input field where the expected format is not obvious, and the application says nothing useful about it. Common examples are reference codes, date formats, internal identifiers, and address fields with local rules. The hint appears before the person types, so the error never happens.

A validator also fits the case where nobody is certain a data quality problem exists. Measure mode records the result without showing anything, producing evidence before anyone changes how the form behaves.

How validators work

A validator runs in one of three modes, ordered from least to most interruption for the person filling in the form.

Mode
What it does
What the person filling in the form sees
What gets recorded

Measure

Runs every rule and records the result. Changes nothing on the page.

Nothing.

Whether each entry matched, and that the form was submitted.

Visible

Adds inline feedback on each field.

The hint when the field is selected, and a colored border after moving on.

The same as Measure.

Warning

Adds a message at the submit button when fields still do not match.

Everything Visible shows, plus a message listing the fields that need attention, with the choice to correct them or submit anyway.

The same as Visible, plus how often the message appeared and how often someone submitted anyway.

You choose the mode at creation and can change it later. Changing it keeps the history, so the record before and after stays comparable.

Warning mode never prevents a submission. That is deliberate: Userlane guides, and the decision stays with the organization running the application.

What is checked, and what is recorded

The rule is evaluated in the browser. What the person typed is never sent to Userlane. Only the result is recorded: whether the entry matched, which validation checked it, and when.

Reporting shows how often entries matched, how often the warning message appeared, and how often someone submitted anyway, broken down per validation. The match rate also feeds the Risk dimension of HEART.

Create a validator

1

Open Validators in the Editor

Open the Editor on the application page that holds the form, then open Validators.

2

Choose the mode

Select Create. In Create a new Validator, choose the mode, then select Create.

3

Select the field to check

On the page, select the field the validator should check.

4

Describe the rule

In Describe the rule to AI, write in plain words what the entry has to follow. Select Add field, then select Continue. For writing or checking a pattern by hand, see Regex patterns for input validation.

5

Record the completion button

Userlane asks for the button people press to submit the form, for example Save or Submit. Select that button on the page.

6

Finish the setup

The Editor panel opens on the left. Name the validator, set the language, and change the mode or the completion button if needed. Add any further fields to validate, then set the audience on the Segmentation tab.

7

Preview and publish

Preview the validator, save it, then publish. Publishing the validator publishes every validation inside it.

Relevant articles

Regex patterns for input validationCreating guidesHEART ScoreTargetingAI features: what data is processed and where

FAQ

Can a validator stop someone submitting a form?

No. A validator in Warning mode shows a message listing the fields that do not match, and the person can still submit the form.

Does Userlane see what people type into a validated field?

No. The rule is evaluated in the browser and only the result is recorded. The entered value is never sent to Userlane.

Can one validator cover several fields?

Yes. A validator holds one validation for each field being checked, and all of them are published together.

What is the difference between a validator and a guide step that checks input?

A validator is always present on the form and checks the field whenever anyone fills it in. A guide step checks input only while someone is following that guide.

Does Measure mode show anything to the person filling in the form?

No. Measure mode records whether entries matched and changes nothing on the page.

Can the mode be changed after a validator is published?

Yes. The mode can be changed at any time, and the record from before the change is kept.

Last updated

Was this helpful?