Skip to content

Validation

VX's own field settings can mark a field required. Validation goes further: it holds a post back from being published until the post as a whole makes sense, and it does that everywhere a post can be written, not just in the block editor.

Turn it on: VX Modules → Modules → Validation. Rules are set per post type on the Validation screen.

The Validation screen — excused roles, strict mode, and the rules for Properties

The five rule types

RuleWhat it checks
RequiredThe field has a value
Required whenThe field has a value, but only when another field has a certain value
UniqueNo other post of this type has the same value
PatternThe value matches a pattern
One ofAt least one of several named fields is filled

VX's own required flags count as rules too — they appear on the screen already in place, marked as coming from VX, so one list tells you everything holding a post back.

Patterns

PatternAccepts
US ZIP code5 digits, or 5-4
Phone numberDigits with spaces, dashes, dots, or parentheses
Digits onlyNumbers, nothing else
Letters onlyLetters, spaces, apostrophes, dots, and dashes
Email addressA valid email address
Web addressStarts with http:// or https://
Custom patternA regular expression of your own, without the slashes

A custom pattern is tested when you save the rule; an expression that does not compile is refused rather than silently never matching.

Excused roles

Pick roles that can publish anyway. They are not hidden from the rules — an excused editor still sees the list of what is missing, with a note that their role can publish regardless. Everyone else is held.

A rule can also name its own roles, overriding the post type's list, for the cases where one rule is stricter than the rest.

Visitors are never excused.

Drafts are never held

Rules apply to publishing, not to saving. A draft or a pending post can be as incomplete as you like — that is what drafts are for. The check happens when the post tries to become public.

Where rules are enforced

WhereWhat happens
Block editorPublish is held with a list of what is missing, rechecked as you type
Classic editor and Quick EditThe post is saved as a draft with a notice
VX Modules formsThe submission is refused with the message beside the field
The SheetThe cell is refused with the message in place
Bulk editThe change is refused with the same message
RESTA publish that breaks a rule is refused
Anything elseChecked after the fact and listed on the dashboard

That last row is the one that matters on an AI-assisted site. An agent writing through an ability, an importer, a sync job — none of them go through an editor, so none of them can be stopped at the door. They are checked after the write and surfaced on the dashboard, so nothing published against the rules stays invisible.

Strict mode

With strict on, a post type's values are also run through VX's own field validation on the way to publish — the type checks and constraints VX itself defines, not just your rules. Turn it on when you want VX's own idea of a valid value enforced at publish time as well.

A worked example

A Properties post type that should never publish half-finished:

  • Required — Price, Bedrooms, Photo
  • Required whenRental terms required when Listing type is rental
  • Unique — MLS number
  • Pattern — ZIP code matches US ZIP code
  • One of — at least one of Phone, Email

Excuse Administrator so you can push something live in a hurry, and leave Author held.

Built by Code Wattz.