2026-05-12 16:17:39 +03:30
|
|
|
import { ApiProperty } from '@nestjs/swagger';
|
|
|
|
|
import { IsString, Matches } from 'class-validator';
|
|
|
|
|
|
2026-05-11 12:40:42 +03:30
|
|
|
export class RequestOtpDto {
|
2026-05-12 16:17:39 +03:30
|
|
|
@ApiProperty({ example: '09122222222' })
|
|
|
|
|
@IsString()
|
|
|
|
|
@Matches(/^(\+?\d{10,15}|09\d{9})$/, {
|
|
|
|
|
message: 'mobile must be a valid mobile number',
|
|
|
|
|
})
|
2026-05-11 12:40:42 +03:30
|
|
|
mobile!: string;
|
|
|
|
|
}
|