"Schema can only contain plain objects" when using Joi with SSR
- Dominant language
- JavaScript
- Stars
- 21.2k
- Forks
- 1.5k
- Avg merge
- 4h 57m
- Merged PRs (30d)
- 14
Description
#### Support plan
* *is this issue currently blocking your project?* (yes/no): yes
* *is this issue affecting a production system?* (yes/no): yes
#### Context
* *node version*: 16.9.0
* *module version*: joi@17.9.1
* *environment* (e.g. node, browser, native): browser
* *used with* (e.g. hapi application, another framework, standalone, ...): nuxt
* *any other relevant information*: only happens with SSR
#### How can we help?
When using the `pattern` command, I get the error "Schema can only contain plain objects". This only happens when trying to enable SSR.
```js
import Joi from "joi";
// copy pasted from the example
const schema = Joi.object({ a: Joi.string() }).pattern(/\w\d/, Joi.boolean());
```
Contributor guide
Assessment
This issue has not been assessed yet.