import { Transform } from 'class-transformer'; import { IsString, MaxLength, MinLength } from 'class-validator'; export class CancelInspectionActDto { @Transform(({ value }) => (typeof value === 'string' ? value.trim() : value)) @IsString() @MinLength(10) @MaxLength(4000) reason!: string; }