Files
CRM_Montzar/apps/api/src/auth/dto.ts
T

37 lines
558 B
TypeScript
Raw Normal View History

import {
IsEmail,
IsIn,
IsString,
MinLength,
} from 'class-validator';
import { BUSINESS_FIELDS } from '@mento/shared';
export class LoginDto {
@IsEmail()
email!: string;
@IsString()
@MinLength(6)
password!: string;
}
export class RegisterOrganizationDto {
@IsString()
@MinLength(2)
organizationName!: string;
@IsString()
@MinLength(2)
fullName!: string;
@IsEmail()
email!: string;
@IsString()
@MinLength(6)
password!: string;
@IsIn([...BUSINESS_FIELDS])
businessField!: (typeof BUSINESS_FIELDS)[number];
}