Im trying to use classValidator decorators in nestJs to validate incomming request of the following type
{
address: string
location: {
longitude: string,
latitude : string
}
}
. the problem is that its just limited to one layer of nestedObject . the one below works
class ProjectLocation {
@IsString()
address: string;
}
export class CreateProjectDto {
@ValidateNested({each:true})
@Type(()=>ProjectLocation)
location:ProjectLocation
}
but when another nested layer is added to ProjectLocation it doesn't work and also you can't use @ValidatedNested inside ProjectLocation to add another class Type to it .
Error : No overload matches this call.