joi icon indicating copy to clipboard operation
joi copied to clipboard

Use same schema in backend and frontend

Open mete89 opened this issue 7 months ago • 0 comments

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?

mete89 avatar Jul 16 '24 08:07 mete89