Nuxt SSR empty vuelidate object
Author: wadclappCreated Jun 11, 2023Updated Dec 5, 2025
Labelsbug2.0
Describe the bug
On Nuxt SSR v$ is empty {}.
Therefore any nested references cause error, e.g. v$.myField.nestedField.
Reproduction URL https://stackblitz.com/edit/nuxt3-vuelidate2-issue?file=app.vue
To Reproduce Steps to reproduce the behavior:
- Go to reproduction
- Notice the printed out
v$is empty initially, When mounted it's then populated, and hydration mismatch error in console - uncomment
<!-- v$.anotherField.nestedField -->in<template>, refresh page, error in console_ctx.v$.anotherField is undefinedand terminalCannot read properties of undefined (reading 'nestedField') - uncomment
<client-only>wrapper, and no error
Expected behavior
No error when trying to access nested properties on v$
Additional context I'm trying to migrate my project from nuxt v2 and vuelidate v0 and I'm getting this issue, am I doing something wrong?
Thanks.
Source: vuelidate/vuelidate