Update ResolversDoc.vue

pull/6632/head
Mert Sincan 2024-10-23 23:07:19 +01:00
parent d2b191ed6e
commit a740599146
1 changed files with 5 additions and 7 deletions

View File

@ -247,7 +247,7 @@ watch(selectedSchema, (newSchema) => {
changeResolver(newSchema);
});
function changeResolver(schema) {
const changeResolver = (schema) => {
if (schema === 'Zod') {
resolver.value = zodResolver(
z.object({
@ -287,12 +287,10 @@ function changeResolver(schema) {
}
}
function handleSubmit() {
resolver.value({ values: initialValues.value }).then(({ valid }) => {
if (valid) {
toast.add({ severity: 'success', summary: 'Form is submitted.', life: 3000 });
}
});
const onFormSubmit = ({ valid }) => {
if (valid) {
toast.add({ severity: 'success', summary: 'Form is submitted.', life: 3000 });
}
}
<\/script>
`