feat(Form): add validate-on error-input

Adds `error-input` option to the validate on prop to validate on input
only when the field has an error.

Resolves #2599
This commit is contained in:
Romain Hamel
2025-06-14 18:09:02 +02:00
parent 59c26ec123
commit d8f29e019d
16 changed files with 47 additions and 29 deletions

View File

@@ -5,7 +5,7 @@ import { reactive } from 'vue'
import InputNumber, { type InputNumberProps, type InputNumberSlots } from '../../src/runtime/components/InputNumber.vue'
import ComponentRender from '../component-render'
import theme from '#build/ui/input-number'
import type { FormInputEvents } from '~/src/module'
import type { FormValidateOn } from '~/src/module'
import { renderForm } from '../utils/form'
describe('InputNumber', () => {
@@ -61,7 +61,7 @@ describe('InputNumber', () => {
})
describe('form integration', async () => {
async function createForm(validateOn?: FormInputEvents[]) {
async function createForm(validateOn?: FormValidateOn[]) {
const wrapper = await renderForm({
state: reactive({ value: 0 }),
props: {