fix bug in create admin dto

This commit is contained in:
2026-04-23 12:58:53 +03:30
parent d501e49b3d
commit 5b1490bc9c
+2 -1
View File
@@ -1,10 +1,11 @@
import { ApiProperty } from '@nestjs/swagger'; import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsOptional, IsString } from 'class-validator'; import { IsNotEmpty, IsOptional, IsPhoneNumber, IsString } from 'class-validator';
export class CreateAdminDto { export class CreateAdminDto {
@ApiProperty({ description: 'Mobile phone number' }) @ApiProperty({ description: 'Mobile phone number' })
@IsNotEmpty() @IsNotEmpty()
@IsString() @IsString()
@IsPhoneNumber("IR")
phone!: string; phone!: string;
@ApiProperty({ description: 'First name', required: false }) @ApiProperty({ description: 'First name', required: false })