I'm not sure if I am using forbidUnknownValues wrong. After the default was set to true in the last release, i refactored my code to initialize the objects with typeorm and not as simple objects, but I still get the error: unknownValue: 'an unknown value was passed to the validate function'
This is how I normally create an entity with TypeORM:
const newPeriod = periodRepository.create({
...period,
...periodInput,
})
await validate(newPeriod)
and i also tried this version:
const period = new Period()
* assign all values to period: period.title = 'Period' .... */
await validate(period)
and this is the error I get in both versions:
ValidationError {
target: Period {
// values ...
},
value: undefined,
property: undefined,
children: [],
constraints: {
unknownValue: 'an unknown value was passed to the validate function'
}
}