Closed Cha-Shao closed 1 year ago
i got this response if I use
const message = errors
.map((error: ValidationError) =>
error.constraints ? Object.values(error.constraints) : error.children.map((error: ValidationError) => Object.values(error.constraints)),
)
.join(', ');
property github should not exist,property youtube should not exist
Describe the Bug (버그 설명)
An error will be thrown when Dto uses ValidateNested
Version to Reproduce (현재 사용한 버전)
Steps to Reproduce (재현 순서)
create a dto
Expected Behavior (예상 동작)
Check the validity of the request and return an error or continue
Actual Behavior (실제 동작)
throw an error and crashed
Additional Context (추가 사항)
I think the problem is here
Because an error occurred in a nested object, the outermost error does not contain constraints
Capture screen (캡쳐 화면)