BlogPlaygroundOne

VForm API


Props
name
type
default
boolean
false

Puts all children inputs into a disabled state.

boolean
false

Stop validation as soon as any rules fail.

boolean
null

The value representing the validity of the form. If the value is null then no validation has taken place yet, or the form has been reset. Otherwise the value will be a boolean that indicates if validation has passed or not.

boolean
false

Puts all children inputs into a readonly state.

  | 'eager'
  | 'lazy'
  | 'blur'
  | 'input'
  | 'submit'
  | 'invalid-input'
  | 'blur lazy'
  | 'input lazy'
  | 'submit lazy'
  | 'invalid-input lazy'
  | 'blur eager'
  | 'input eager'
  | 'submit eager'
  | 'invalid-input eager'
  | 'lazy blur'
  | 'lazy input'
  | 'lazy submit'
  | 'lazy invalid-input'
  | 'eager blur'
  | 'eager input'
  | 'eager submit'
  | 'eager invalid-input'
'input'

Changes the events in which validation occurs.

Events
name
type
[SubmitEventPromise]

Emitted when form is submitted.

[boolean]

Event emitted when the form’s validity changes.

Slots
{ errors: FieldValidationResult[] isDisabled: boolean isReadonly: boolean isValidating: boolean isValid: boolean items: FormField[] validate: () => Promise<FormValidationResult> reset: () => void resetValidation: () => void }

The default Vue slot.

Exposed
{ id: string | number; errorMessages: string[] }[]
boolean
boolean
boolean
boolean
{ id: string | number validate: () => Promise<string[]> reset: () => Promise<void> resetValidation: () => Promise<void> vm: Raw<ComponentInternalInstance> isValid: boolean | null errorMessages: string[] }[]
() => void
() => void
() => Promise<{ valid: boolean errors: { id: string | number; errorMessages: string[] }[] }>

Contains all current form input errors.

Indicates if form is disabled or not.

Indicates if form is readonly or not.

Indicates if form is valid or not.

Indicates if form is currently being validated or not.

Array of all registered inputs.

Resets validation of all registered inputs, and clears their values.

Resets validation of all registered inputs without modifying their values.

Validates all registered inputs.