class-transformer
class-transformer copied to clipboard
Validation object's target property contains excluded properties
When I'm validating against excluded property of class target is getting populated by empty object with key name of excluded property.
Call of plainToClass is following:
const result = plainToClass(metatype, value, {
excludeExtraneousValues: true,
excludePrefixes: ['_'],
});
const errors = await validate(result);
Anyway target contains excluded value _map. Trying to figure out whether this is a bug or just missing something.
{
"error": "Request validation failed",
"message": [
{
"children": [],
"constraints": {
...
},
"property": "products",
"target": {
"_map": {},
...
}
}
],
"statusCode": 400
}
any news here?