import { Transform } from 'class-transformer';
import { IsNotEmpty } from 'class-validator';

export class CreateChallengeDto {
  @IsNotEmpty({ message: 'Short Description Should Not be Empty.' })
  @Transform(({ value }) => value.trim().replace(/\s+/g, ' '))
  description_short: string;

  @Transform(({ value }) => value.trim().replace(/\s+/g, ' '))
  description_long: string;
}
