mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-19 22:41:42 +01:00
fix(Form): fix wrong type of validate (#496)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
committed by
Benjamin Canac
parent
8b19b1880e
commit
3d6839da97
@@ -248,7 +248,7 @@ const schema = z.object({
|
||||
password: z.string().min(8, 'Must be at least 8 characters')
|
||||
})
|
||||
|
||||
const state: Partial<Schema> = ref({
|
||||
const state = ref<Partial<Schema>>({
|
||||
email: undefined,
|
||||
password: undefined
|
||||
})
|
||||
@@ -259,7 +259,7 @@ type Schema = z.output<typeof schema>
|
||||
const form = ref<Form<Schema>>()
|
||||
|
||||
async function submit() {
|
||||
const data: Schema = await form.value!.validate()
|
||||
const data = await form.value!.validate()
|
||||
// Do something with data
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user