Skip to content

eq

Field validator

All field validators

The value must equal a given value.

Written as
"Validators": [{ "Type": "eq" }]
Invert
Accepts Invert to reverse the test.
In Liquid
{{ eq_validator }} — the typed object a template reads for this rule.
Use with
checkboxlist, code, date, datetime, dictionary, emails, fieldset, html, labels, objecttype, path, select, text, textarea, textlist, timezone, url

Properties

Accepted in addition to the shared properties every definition carries.

Property Required Description
Message Text shown when the value fails this check.
Value The value compared against.

Notes

Compares the stored value as a string. On a structured type such as a fieldset or a list the comparison is against the serialized value, which is rarely what an author wants.