NestJS backend with Prisma, Docker Compose for Postgres/Redis, and deploy docs for the production VM.
15 lines
356 B
TypeScript
15 lines
356 B
TypeScript
import { IsString, Length, Matches } from 'class-validator';
|
|
|
|
export class VerifyOtpDto {
|
|
@IsString()
|
|
@Matches(/^\+[1-9]\d{6,14}$/, {
|
|
message: 'cellNumber must be in E.164 format (e.g. +989121234567)',
|
|
})
|
|
cellNumber!: string;
|
|
|
|
@IsString()
|
|
@Length(6, 6)
|
|
@Matches(/^\d{6}$/, { message: 'code must be a 6-digit number' })
|
|
code!: string;
|
|
}
|