15 lines
310 B
TypeScript
15 lines
310 B
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import { IsString, ValidateIf } from 'class-validator';
|
|
|
|
export class OtpVerifyDto {
|
|
@ApiProperty({
|
|
name: 'otp_code',
|
|
type: String,
|
|
required: true,
|
|
example: '2345',
|
|
})
|
|
@IsString()
|
|
@ValidateIf((body) => body.otp_code)
|
|
otp_code: string;
|
|
}
|