fix bug in create admin dto
This commit is contained in:
@@ -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 })
|
||||||
|
|||||||
Reference in New Issue
Block a user