| 1 | import { IsEmail, IsNotEmpty, IsString, MinLength } from 'class-validator'; |
| 2 | |
| 3 | export class RegisterDto { |
| 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 | @MinLength(6, { message: 'Password must be at least 6 characters long' }) |
| 10 | @IsNotEmpty({ message: 'Password is required' }) |
| 11 | password: string; |
| 12 | |
| 13 | @IsString({ message: 'Name must be a string' }) |
| 14 | @IsNotEmpty({ message: 'Name is required' }) |
| 15 | name: string; |
| 16 | } |