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.
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.
- disabledboolean
- Disables the field — prevents interaction and validation.
- errorstring | boolean
- Forces the field into an error state regardless of rule results.
- errorMessagesArray<string> | string
- Static error message(s) shown alongside rule-produced errors.
- maxErrorsnumber | string
- Maximum number of error messages to display simultaneously.
- namestring
- HTML name attribute and validation identifier for the field.
- labelstring
- Label text displayed above or inside the field.
- readonlyboolean
- Makes the field non-editable while keeping it focusable and validatable.
- rulesArray<any>
- Array of validation rule functions. Each receives the current value and returns true (valid) or an error string.
- modelValueany
- The v-model value of the field, forwarded to rule functions during validation.
- validateOnTValidateOn
- When validation runs — e.g. "input", "blur", "submit", or combinations thereof.
- validationValueany
- 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