Skip to content

Modify does not change internal values in array #177

@DvirSh

Description

@DvirSh

I have this array:

arr = ["3","5"];

And I have tried to do something like this:

Joi.validate(arr, Joi.array().includes(Joi.number().options({modify: true})));

It did not convert the internal numbers (but it did validate the array, and if I change a value so it is not a number validation will fail as it should).
I also tried to move the modify to the Joi.validate call itself (in options) but it did not work.

Metadata

Metadata

Assignees

Labels

bugBug or defect

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions