Update ResolversDoc.vue
parent
d2b191ed6e
commit
a740599146
|
@ -247,7 +247,7 @@ watch(selectedSchema, (newSchema) => {
|
||||||
changeResolver(newSchema);
|
changeResolver(newSchema);
|
||||||
});
|
});
|
||||||
|
|
||||||
function changeResolver(schema) {
|
const changeResolver = (schema) => {
|
||||||
if (schema === 'Zod') {
|
if (schema === 'Zod') {
|
||||||
resolver.value = zodResolver(
|
resolver.value = zodResolver(
|
||||||
z.object({
|
z.object({
|
||||||
|
@ -287,12 +287,10 @@ function changeResolver(schema) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleSubmit() {
|
const onFormSubmit = ({ valid }) => {
|
||||||
resolver.value({ values: initialValues.value }).then(({ valid }) => {
|
if (valid) {
|
||||||
if (valid) {
|
toast.add({ severity: 'success', summary: 'Form is submitted.', life: 3000 });
|
||||||
toast.add({ severity: 'success', summary: 'Form is submitted.', life: 3000 });
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
<\/script>
|
<\/script>
|
||||||
`
|
`
|
||||||
|
|
Loading…
Reference in New Issue