Comments (5)
resolved with the help of @Boluwatife2904.
Issue was with returning a value from the usefetch call.
email: z.string({ required_error: "Business Email is required" }).email({ message: "Invalid email address" }). refine(async (val) => { const { data, error } = await useFetch('/user/is_email_available', { query: { email: val } }); return data.value }, (val) => ({ message:
${val} is not available })),
from nuxt.js.
Would you be able to provide a reproduction? 🙏
More info
Why do I need to provide a reproduction?
Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making.
What will happen?
If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritize it based on its severity and how many people we think it might affect.
If needs reproduction
labeled issues don't receive any substantial activity (e.g., new comments featuring a reproduction link), we'll close them. That's not because we don't care! At any point, feel free to comment with a reproduction and we'll reopen it.
How can I create a reproduction?
We have a couple of templates for starting with a minimal reproduction:
👉 https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz
👉 https://codesandbox.io/s/github/nuxt/starter/v3-codesandbox
A public GitHub repository is also perfect. 👌
Please ensure that the reproduction is as minimal as possible. See more details in our guide.
You might also find these other articles interesting and/or helpful:
from nuxt.js.
This seems like a zod question rather than a Nuxt one.
from nuxt.js.
@danielroe yes I have asked in zod as well. Asking here in case someone has faced and resolved a similar challenge.
from nuxt.js.
I have checked the documentation and the only thing that maybe accounting for this will be
this warning from the docs ⚠️ If you use async refinements, you must use the .parseAsync method to parse data! Otherwise Zod will throw an error.
but I have other methods that are also async and work just fine ( they don't call server api methods but superbase api via client)
from nuxt.js.
Related Issues (20)
- feat: support passing options to `TypedRouterOptions` when using `experimental.typedPages` HOT 7
- Dynamic layouts HOT 4
- Previous route info HOT 2
- Imported CSS files not correctly injected in circumstances involving lazy-loaded components HOT 1
- Nuxt 3 Dev build time is very slow in WSL 2 Linux Ubuntu ~ ranging up to 30 seconds just to refresh changes HOT 3
- Warning during nuxt generate - cache-driver.js is imported by "virtual:#internal/nitro/virtual/storage", but could not be resolved HOT 1
- "Error: Unable to find component 'path to the component' in the directory 'path to the directory'. The error message 'Cannot read property 'length' of undefined' indicates that there is a bug with nested folder of components. HOT 2
- Betterstack plugin HOT 1
- Server Components missing parent's scoped styles HOT 1
- It is impossible to prevent the display of a 404 error in the browser console HOT 1
- Transitions with comments in pages creates warning + failed to render next route HOT 2
- useFetch and useAsyncData loading twice (SSR & Client) when inside a dynamic loaded component HOT 3
- onMounted hook called twice during pageTransition with out-in mode HOT 1
- 'getActivePinia()" was called but there was no active Pinia' is back HOT 7
- Passing date from frontend to server HOT 1
- if computed returns a object {} and await in setup, triggering the watch callback and causing an infinite loop. HOT 4
- Nuxt SPA breaks when adding a preset for @vueuse/router HOT 5
- Normal plugin depending on a server-only one causes an error HOT 4
- `asyncScripts` _breaks_ `nuxtServerInit` HOT 4
- How can useFetch prevent him from shaking when searching? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuxt.js.