src/auth/dto/setpass.dto.ts
Properties |
| code |
Type : string
|
Decorators :
@IsString()
|
|
Defined in src/auth/dto/setpass.dto.ts:11
|
| id |
Type : string
|
Decorators :
@IsString()
|
|
Defined in src/auth/dto/setpass.dto.ts:15
|
| password |
Type : string
|
Decorators :
@MinLength(8, {message: undefined})
|
|
Defined in src/auth/dto/setpass.dto.ts:26
|
import { IsNotEmpty, IsString, MaxLength, MinLength } from 'class-validator';
import { RegisterRespEnum } from '../../utils/enums/responses/register.enum';
import { IsCodeValid } from '../../common/decorators/codevaild.decorator';
import { IsCodeExpired } from '../../common/decorators/codeexpired.decorator';
export class SetOauthPassDto {
@IsString()
@IsNotEmpty()
@IsCodeValid()
@IsCodeExpired()
code: string;
@IsString()
@IsNotEmpty()
id: string;
@MinLength(8, {
message: RegisterRespEnum.ERR_PASSWORD_TOOSHORT,
})
@MaxLength(128, {
message: RegisterRespEnum.ERR_PASSWORD_TOOLONG,
})
@IsNotEmpty({
message: RegisterRespEnum.ERR_PASSWORD_INVALID,
})
password: string;
}