chore: add register of user

This commit is contained in:
mahyargdz
2025-01-20 12:50:04 +03:30
parent 53a3d46ef5
commit 7431dad85f
16 changed files with 224 additions and 51 deletions
+16
View File
@@ -0,0 +1,16 @@
import { ApiProperty } from "@nestjs/swagger";
import { IsEmail, IsNotEmpty, IsString } from "class-validator";
import { AuthMessage } from "../../../common/enums/message.enum";
export class LoginPasswordDTO {
@IsNotEmpty({ message: AuthMessage.EMAIL_NOT_EMPTY })
@IsEmail(undefined, { message: AuthMessage.INVALID_EMAIL_FORMAT })
@ApiProperty({ description: "email of user", default: "user@test.ir" })
email: string;
@IsNotEmpty({ message: AuthMessage.PasswordNotEmpty })
@IsString({ message: AuthMessage.INVALID_PASS_FORMAT })
@ApiProperty({ type: "string", description: "password user", example: "@1234" })
password: string;
}