joi
joi copied to clipboard
Use same schema in backend and frontend
Runtime
node.js & browser
Runtime version
Latest
Module version
Latest
Used with
No response
Any other relevant information
No response
How can we help?
For those who want to have only one schema for both backend and frontend, what is the correct conversion path? The same need is described in the thread below: https://github.com/hapijs/joi/issues/2385#issuecomment-1922585161
I can use describe() in the Node.js part, but how do I compile it again in the browser? I tried using the compile() function, but it didn't work. The build() function is not included in the browser version.
Isn't this a valid use case?