src/auth/dto/auth-credential.dto.ts
Properties |
| password |
Type : string
|
Decorators :
@IsString()
|
|
Defined in src/auth/dto/auth-credential.dto.ts:17
|
| username |
Type : string
|
Decorators :
@IsString()
|
|
Defined in src/auth/dto/auth-credential.dto.ts:8
|
import { Matches, IsString, MinLength, MaxLength } from 'class-validator';
export class AuthCredentialDto {
@IsString()
@MinLength(4)
@MaxLength(20)
username: string;
@IsString()
@MinLength(4)
@MaxLength(20)
@Matches(
/((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/,
{message: 'Password must contain uppercase, lowercase and symbol'},
)
password: string;
}