Files
twenty/server/src/core/auth/dto/register.input.ts
T
Jérémy M 299ca293a8 feat: refactoring auth & add email password login (#318)
* feat: wip

* fix: issues

* feat: clean controllers and services

* fix: test

* Fix auth

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-06-17 13:42:02 +02:00

25 lines
403 B
TypeScript

import {
IsEmail,
IsNotEmpty,
IsString,
Matches,
MinLength,
} from 'class-validator';
import { PASSWORD_REGEX } from '../auth.util';
export class RegisterInput {
@IsNotEmpty()
@IsEmail()
email: string;
@IsNotEmpty()
@IsString()
@MinLength(8)
@Matches(PASSWORD_REGEX, { message: 'password too weak' })
password: string;
@IsNotEmpty()
@IsString()
displayName: string;
}