Skip to content

TypeError: false.byteLength is not a function #2131

@yevheni

Description

@yevheni

Context

  • node version: 10.16.3
  • joi version: 16.1.2
  • environment: browser
  • used with: standalone

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

When I use this:

Joi.string().email({ tlds: false }).required()

Which result you had ?

I get error:

Screenshot 2019-09-20 at 12 19 56

Screenshot 2019-09-20 at 12 19 40

But when I toggle option "ignoreLength" to true, like this:

Joi.string().email({ tlds: false, ignoreLength: true }).required()

All works properly.

I think this issue must be fixed.

P.s.: Thank you so much for Joi. It very much helps 😀

Metadata

Metadata

Labels

bugBug or defect

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions