IValidationProps

interface
Form & Validation

Complete validation surface for form-control components — extends IFocusProps with rules, error state, error messages, disabled/readonly flags, label and the validateOn trigger.

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

Inheritance

Extends

Parent interfaces this one inherits from. Their properties are available on every consumer of this interface.

API

Properties

Every property declared by this interface, with its type, optionality and default.

disabled
boolean
Disables the field — prevents interaction and validation.
error
string | boolean
Forces the field into an error state regardless of rule results.
errorMessages
Array<string> | string
Static error message(s) shown alongside rule-produced errors.
maxErrors
number | string
Maximum number of error messages to display simultaneously.
name
string
HTML name attribute and validation identifier for the field.
label
string
Label text displayed above or inside the field.
readonly
boolean
Makes the field non-editable while keeping it focusable and validatable.
rules
Array<any>
Array of validation rule functions. Each receives the current value and returns true (valid) or an error string.
modelValue
any
The v-model value of the field, forwarded to rule functions during validation.
validateOn
TValidateOn
When validation runs — e.g. "input", "blur", "submit", or combinations thereof.
validationValue
any
Override the value passed to rule functions (useful when the internal representation differs from modelValue).

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Declaring a typed form-field component

typescript