feat: implement backend auth and fix pet profile payload

This commit is contained in:
parsa committed 2026-06-12 22:37:35 +03:30
1 parent 82ab454647
commit 6027e635db
13 files changed
+493 -114

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
import { IsNotEmpty, IsString, MinLength } from 'class-validator';
export class LoginDto {
@IsNotEmpty({ message: 'شماره موبایل الزامی است' })
@IsString()
mobile: string;
@IsNotEmpty({ message: 'رمز عبور الزامی است' })
@MinLength(6, { message: 'رمز عبور باید حداقل ۶ کاراکتر باشد' })
password: string;
}
+23
View File
@@ -0,0 +1,23 @@
import { IsEmail, IsNotEmpty, IsOptional, IsString, MinLength } from 'class-validator';
export class RegisterDto {
@IsNotEmpty({ message: 'نام الزامی است' })
@IsString()
firstName: string;
@IsNotEmpty({ message: 'نام خانوادگی الزامی است' })
@IsString()
lastName: string;
@IsOptional()
@IsEmail({}, { message: 'ایمیل نامعتبر است' })
email?: string;
@IsNotEmpty({ message: 'شماره موبایل الزامی است' })
@IsString()
mobile: string;
@IsNotEmpty({ message: 'رمز عبور الزامی است' })
@MinLength(6, { message: 'رمز عبور باید حداقل ۶ کاراکتر باشد' })
password: string;
}