- Backend (NestJS): 82 suites, 641 tests passing; 0 ESLint errors; 0 tsc errors. Hardened SSL cert/key matching, SSRF IP pinning, and eBank validation. - Admin Panel (Vite/React): 48 suites, 300 tests passing; 0 ESLint errors; 0 tsc errors. Full coverage across all pages and settings. - Storefront (Next.js): 62 suites, 368 tests passing; 0 ESLint errors; 0 tsc errors. - Fixed unmount lifecycle guards, promise error handling, and component edge cases.
39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
import {
|
|
IsEmail,
|
|
IsNotEmpty,
|
|
IsOptional,
|
|
IsString,
|
|
MinLength,
|
|
} from "class-validator";
|
|
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
|
|
|
export class RegisterDto {
|
|
@ApiProperty({ description: "نام", example: "علی" })
|
|
@IsNotEmpty({ message: "نام الزامی است" })
|
|
@IsString()
|
|
firstName: string;
|
|
|
|
@ApiProperty({ description: "نام خانوادگی", example: "رضایی" })
|
|
@IsNotEmpty({ message: "نام خانوادگی الزامی است" })
|
|
@IsString()
|
|
lastName: string;
|
|
|
|
@ApiPropertyOptional({
|
|
description: "ایمیل (اختیاری)",
|
|
example: "ali@example.com",
|
|
})
|
|
@IsOptional()
|
|
@IsEmail({}, { message: "ایمیل نامعتبر است" })
|
|
email?: string;
|
|
|
|
@ApiProperty({ description: "شماره موبایل", example: "09123456789" })
|
|
@IsNotEmpty({ message: "شماره موبایل الزامی است" })
|
|
@IsString()
|
|
mobile: string;
|
|
|
|
@ApiProperty({ description: "رمز عبور", example: "password123" })
|
|
@IsNotEmpty({ message: "رمز عبور الزامی است" })
|
|
@MinLength(6, { message: "رمز عبور باید حداقل ۶ کاراکتر باشد" })
|
|
password: string;
|
|
}
|