mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-24 17:00:36 +01:00
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:
@@ -4,7 +4,7 @@ import Textarea, { type TextareaProps, type TextareaSlots } from '../../src/runt
|
||||
import ComponentRender from '../component-render'
|
||||
import theme from '#build/ui/textarea'
|
||||
import { renderForm } from '../utils/form'
|
||||
import type { FormInputEvents } from '~/src/module'
|
||||
import type { FormValidateOn } from '~/src/module'
|
||||
|
||||
describe('Textarea', () => {
|
||||
const sizes = Object.keys(theme.variants.size) as any
|
||||
@@ -107,7 +107,7 @@ describe('Textarea', () => {
|
||||
})
|
||||
|
||||
describe('form integration', async () => {
|
||||
async function createForm(validateOn?: FormInputEvents[], eagerValidation?: boolean) {
|
||||
async function createForm(validateOn?: FormValidateOn[], eagerValidation?: boolean) {
|
||||
const wrapper = await renderForm({
|
||||
props: {
|
||||
validateOn,
|
||||
|
||||
Reference in New Issue
Block a user