feat(Form): add Standard Schema support (#2303)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Fabian Hiller
2024-10-07 17:25:52 -04:00
committed by GitHub
parent aa8fa5be3a
commit 0955c07edd
5 changed files with 264 additions and 247 deletions

View File

@@ -1,3 +1,4 @@
import type { StandardSchema } from '@standard-schema/spec'
import type { ComputedRef, Ref } from 'vue'
import type { ZodSchema } from 'zod'
import type { Schema as JoiSchema } from 'joi'
@@ -21,6 +22,7 @@ export type FormSchema<T extends Record<string, any>> =
| ValibotSchema | ValibotSchemaAsync
| ValibotSafeParser<any, any> | ValibotSafeParserAsync<any, any>
| JoiSchema<T>
| StandardSchema
export type FormInputEvents = 'input' | 'blur' | 'change'