| 1 | import { IsEmail, IsNotEmpty, IsString } from 'class-validator'; |
| 2 | |
| 3 | export class LoginDto { |
| 4 | @IsEmail({}, { message: 'Please provide a valid email' }) |
| 5 | @IsNotEmpty({ message: 'Email is required' }) |
| 6 | email: string; |
| 7 | |
| 8 | @IsString({ message: 'Password must be a string' }) |
| 9 | @IsNotEmpty({ message: 'Password is required' }) |
| 10 | password: string; |
| 11 | } |