21 lines
506 B
TypeScript
21 lines
506 B
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import { IsNotEmpty, IsString, Matches } from 'class-validator';
|
|
|
|
export class LoginQueueDto {
|
|
@ApiProperty({ name: 'name', required: true })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
name: string;
|
|
|
|
@ApiProperty({
|
|
name: 'phone',
|
|
required: true,
|
|
description: 'Phone Number Must Start With 62, no + or 0',
|
|
example: '628123456789',
|
|
})
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
@Matches(/^628\d+$/i, { message: 'Nomor Telepon tidak valid' })
|
|
phone: string;
|
|
}
|