🚀 release v3.0.0

This commit is contained in:
Amruth Pillai
2022-03-06 22:48:29 +01:00
parent 00505a9e5d
commit 9c1380f401
373 changed files with 12050 additions and 15783 deletions

View File

@ -0,0 +1,30 @@
import { Transform } from 'class-transformer';
import { IsEmail, IsNotEmpty, IsString, Matches, MinLength } from 'class-validator';
export class CreateUserDto {
@IsString()
@IsNotEmpty()
name: string;
@MinLength(3)
@Transform(({ value }) => (value as string).toLowerCase().replace(/[ ]/gi, '-'))
@Matches(/^[a-z0-9-]+$/, {
message: 'username can contain only lowercase characters, numbers and hyphens',
})
username: string;
@IsEmail()
@IsNotEmpty()
email: string;
@IsString()
@IsNotEmpty()
password: string;
@IsString()
@IsNotEmpty()
provider: 'email';
@IsString()
resetToken?: string;
}