Nested validation
Validating DTOs inside one another.
@ArrayNotEmpty()
@ArrayUnique()
@ValidateNested()
@Type(() => IdDto)
readonly categories: IdDto[];/** Checks if the value is an object with only a serial id. */
export const IsEntity = (): PropertyDecorator =>
applyDecorators(
IsDefined(),
ValidateNested(),
Type(() => IdDto),
);Last updated