When to use these helpers
Validation helpers return true when the value is valid and a localized validation message when it is not. In field validation contexts, the current value is supplied automatically when the helper’s value argument is omitted.Calling style
Call a helper asv.required($.field). Not every helper is available everywhere: validation, form, and document-template helpers have distinct context contracts. Editor suggestions are not proof that a helper is supported at runtime.
Complete function reference
v
Returns true for a passing condition or a localized error value for a failed condition.
Signature: v(condition, error)
Example:
v.atLeastXYearsOld
Checks an age threshold from a date.
Signature: v.atLeastXYearsOld(value, years)
Example:
v.contains
Checks that text contains a required fragment.
Signature: v.contains(value, fragment)
Example:
v.datePattern
Checks that a value is a valid date.
Signature: v.datePattern(value)
Example:
v.endsWith
Checks that text ends with a required suffix.
Signature: v.endsWith(value, suffix)
Example:
v.equal
Checks strict equality with an expected value.
Signature: v.equal(value, expected)
Example:
v.greaterThan
Checks that a numeric value is greater than a limit.
Signature: v.greaterThan(value, limit)
Example:
v.greaterThanOrEqual
Checks that a numeric value meets a minimum.
Signature: v.greaterThanOrEqual(value, minimum)
Example:
v.lessOrEqual
Checks that a numeric value does not exceed a limit.
Signature: v.lessOrEqual(value, maximum)
Example:
v.lessThan
Checks that a numeric value is less than a limit.
Signature: v.lessThan(value, limit)
Example:
v.matchRegex
Checks that text matches a regular expression.
Signature: v.matchRegex(value, pattern)
Example:
v.maxLength
Checks the maximum length of text or a list.
Signature: v.maxLength(value, maximum)
Example:
v.minLength
Checks the minimum length of text or a list.
Signature: v.minLength(value, minimum)
Example:
v.notOneOf
Checks that a value is not one of the supplied options.
Signature: v.notOneOf(value, options)
Example:
v.oneOf
Checks that a value is one of the supplied options.
Signature: v.oneOf(value, options)
Example:
v.onlyAlphabets
Allows letters and spaces only.
Signature: v.onlyAlphabets(value)
Example:
v.onlyAlphabetsOfLanguage
Allows letters for a chosen language and spaces only.
Signature: v.onlyAlphabetsOfLanguage(value, language)
Example:
v.onlyDigits
Allows ASCII digits only.
Signature: v.onlyDigits(value)
Example:
v.phoneNumber
Checks an international-style phone number.
Signature: v.phoneNumber(value)
Example:
v.required
Checks that a value is present and non-blank.
Signature: v.required(value)
Example:
v.startsWith
Checks that text starts with a required prefix.
Signature: v.startsWith(value, prefix)
Example:
v.validEmail
Validates an email address.
Signature: v.validEmail(value)
Example:
Before you publish
- Start with a known value and confirm the expected result.
- Handle null, empty text, and empty lists deliberately.
- Do not place secrets, access tokens, or sensitive personal data in an expression.
- Read expression contexts and availability before copying an expression between features.


