import { Transform } from 'class-transformer';
import {
  IsEmail,
  IsNotEmpty,
  IsOptional,
  IsStrongPassword,
  Matches,
} from 'class-validator';

export class UserLoginDto {
  @Transform(({ value }) => value.trim().replace(/\s+/g, ' '))
  @IsNotEmpty({ message: 'Email or contact number should not be empty.' })
  identifier: string;

  @IsNotEmpty({ message: 'Password cannot be empty.' })
  password: string;

  @IsOptional()
  fcm_token: string;
}
