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

Définition

La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

Héritage

Hérite de

Interfaces parentes dont celle-ci hérite. Leurs propriétés sont disponibles pour tout consommateur de cette interface.

API

Propriétés

Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.

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).

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

Declaring a typed form-field component

typescript