mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
feat(Form): support for valibot@33 (#132)
This commit is contained in:
@@ -106,14 +106,19 @@ describe('Form', () => {
|
||||
}
|
||||
],
|
||||
['valibot', {
|
||||
schema: valibot.objectAsync({
|
||||
schema: valibot.object({
|
||||
email: valibot.string(),
|
||||
password: valibot.string([
|
||||
valibot.minLength(8, 'Must be at least 8 characters')
|
||||
])
|
||||
password: valibot.pipe(valibot.string(), valibot.minLength(8, 'Must be at least 8 characters'))
|
||||
})
|
||||
}
|
||||
],
|
||||
['valibot safeParser', {
|
||||
schema: valibot.safeParser(valibot.object({
|
||||
email: valibot.string(),
|
||||
password: valibot.pipe(valibot.string(), valibot.minLength(8, 'Must be at least 8 characters'))
|
||||
}))
|
||||
}
|
||||
],
|
||||
['custom', {
|
||||
async validate(state: any) {
|
||||
const errs = []
|
||||
|
||||
Reference in New Issue
Block a user