Inicio - Documentación - POM Theme - 06 Forms - Configure required fields and validation

Configure required fields and validation

Validation should explain how to correct an answer while collecting no more information than the workflow needs. POM Forms validates visible fields on the server as well as providing browser-facing controls.

Mark only essential answers required

  1. Select a field in Builder.
  2. Open Properties → Basic Properties.
  3. Enable Required only when processing cannot continue without the answer.
  4. Add Help Text when the format or reason is not obvious.
  5. Save and test the empty state.

Conditional Require If is preferable when the answer is essential only on one branch.

Apply type-specific limits

Use Field-Specific Settings for the narrowest valid rule:

  • Text: minimum or maximum length and optional pattern.
  • Email: allowed domains and optional pattern.
  • Phone: allowed characters, country code, and optional pattern.
  • URL: optional HTTPS requirement.
  • Number: minimum, maximum, step, or integer-only.
  • Textarea: length, word limit, rows, and character counter.
  • Select and Checkbox Group: minimum or maximum selections.
  • Date and time: range, disabled dates, format, and timezone.
  • Uploads: size, MIME type, and file count.

Do not add a regular expression when a field type already expresses the requirement.

Customize correction messages

Site defaults live under Settings → POM Theme → Forms → Forms defaults. A form can override them under Messages/Behavior → Custom Messages.

Write messages as instructions:

  • “Enter at least {min} characters.”
  • “Choose no more than {max} options.”
  • “Upload a permitted file smaller than {max}.”

The available placeholders depend on the validation rule. Leave a per-form field empty to inherit its theme default.

Verification

For each rule, test:

  1. An empty value.
  2. The smallest invalid value.
  3. A boundary value.
  4. A clearly valid value.
  5. The same field when its conditional branch is hidden.
  6. Forward navigation when the field is on a multi-step form.

Confirm focus and the error message identify the same control. Do not rely on color alone.

If a valid-looking value fails, compare the submitted format with the field’s pattern, date format, numeric step, domain list, or MIME restriction. See Configure form feedback for message behavior.