Dynamic form

submit

Triggered when the form is submitted by clicking and <input type="submit"> or a <button submit="true"> and passing the validation.

if (isValid.value) {
  ctx.emit('submitted', formValues.value)
}

error

Triggered when the form is submitted but errors has been found.

else {
   ctx.emit('error', errors.value);
}

change

Triggered when a form field value is changed via modifying the input.

function emitChanges(changes: FormChanges) {
  ctx.emit('change', changes)
}

Dynamic Input

change

Triggered when the input value is changed.

function valueChange(event) {
  ctx.emit('change', event)
}

focus

Triggered when the input is focused.

onFocus: (e: InputEvent) => emit('focus', e),

blur

Triggered when the input has lost focus.

onBlur: (e: InputEvent) => emit('blur', e),

validate

Triggered when the input has been validated.

   onValidate: (validation: ValidationEvent) =>
          emit('validate', validation),