12 lines
203 B
TypeScript
12 lines
203 B
TypeScript
import { IsEmail, IsString, Length, Matches } from "class-validator";
|
|
|
|
export class EmailLoginDto {
|
|
@IsEmail()
|
|
email!: string;
|
|
|
|
@IsString()
|
|
@Length(6, 6)
|
|
@Matches(/^\d{6}$/)
|
|
code!: string;
|
|
}
|