Skip to content

"Schema can only contain plain objects" when using Joi with SSR #2942

Open
@MajorMeerkatThe3rd

Description

@MajorMeerkatThe3rd

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: [email protected]
  • 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.

import Joi from "joi";

// copy pasted from the example
const schema = Joi.object({ a: Joi.string() }).pattern(/\w\d/, Joi.boolean());

Metadata

Metadata

Assignees

No one assigned

    Labels

    supportQuestions, discussions, and general support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions