Skip to content

VValidation API

属性

名称类型默认值
disabled
Removes the ability to click or target the component.
error
Puts the input in a manual error state.
error-messages
Puts the input in an error state and passes through custom error messages. Will be combined with any validations that occur from the rules prop. This field will not trigger validation
focused
Forces a focused state styling on the component.
label
Sets the text of the v-label or v-field-label component.
max-errors
Control the maximum number of shown errors from validation.
model-value
The v-model value of the component. If component supports the multiple prop, this defaults to an empty array.
name
Sets the component’s name attribute.
readonly
Puts input in readonly state.
rules
Accepts a mixed array of types function, boolean and string. Functions pass an input value as an argument and must return either true / false or a string containing an error message. The input field will enter an error state if a function returns (or any value in the array contains) false or is a string.
validate-on
Change what type of event triggers validation to run.
validation-value
The value used when applying validation rules.

事件

名称类型
update:focused
Event that is emitted when the component’s focus state changes.
update:modelValue
Event that is emitted when the component’s model changes.

插槽

default
The default Vue slot.