Skip to content

Email validation error in v17.8.1 #2915

@vmarannan

Description

@vmarannan

Support plan

  • is this issue currently blocking your project? (yes/no): no
  • is this issue affecting a production system? (yes/no): no

Context

  • node version: v18.0
  • module version: v17.8.1
  • environment (e.g. node, browser, native): browser
  • used with (e.g. hapi application, another framework, standalone, ...): hapi
  • any other relevant information:

What are you trying to achieve or the steps to reproduce?

Schema

Joi.object({
  email: Joi.string()
        .email({ tlds: { allow: false } })
})

Data To Validate

{ 
  email: 'somevalid@email.com'
}

Result

TypeError: Cannot read properties of undefined (reading 'has')

What result did you expect?

Validate without error as stated on https://joi.dev/api/?v=17.8.1#stringemailoptions

Metadata

Metadata

Assignees

Labels

bugBug or defectsupportQuestions, discussions, and general support

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions