Closed
Description
Right now its not possible to use join in the browser using browserify because it requires a dynamic string.
Browserify doesn't know how to resolve this and will throw a error like:
Uncaught Error: Cannot find module '/node_modules/joi/languages/en-us.json'
As cleanest option to resolve this I would see passing in the locales as object alternatively. Then I could setup my browser js by using something like:
joi.validate(object, rules, {localeData: require("joi/locales/en-us")});
What do you think?