Open hckhanh opened 2 days ago
Hello! It looks like you're trying to use the function before the component is mounted:
form.value?.setErrors(/* ... */); // This will be undefined since the component is not mounted
onMounted(() => {
form.value.setErrors(/* ... */); // This will be defined
});
See: https://vuejs.org/guide/essentials/template-refs.html#accessing-the-refs
The onSubmit function is called after the component is mounted
Can you send me a reproduction using Stackblitz so I can have a look? I can't reproduce the issue from the documentation's example
Environment
Version
3.12.2
Reproduction
I try to follow this example on docs:
Description
Is there anything is out of dated compare to the latest version of nuxt?
Additional context
Logs
No response