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

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

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