src/users/dto/update-data.dto.ts
Properties |
|
| Public Optional email |
Type : string
|
Decorators :
@IsEmail(undefined, {message: undefined})
|
|
Defined in src/users/dto/update-data.dto.ts:37
|
| Public Optional oldPassword |
Type : string
|
Decorators :
@IsOptional()
|
|
Defined in src/users/dto/update-data.dto.ts:41
|
| Public Optional password |
Type : string
|
Decorators :
@MinLength(8, {message: undefined})
|
|
Defined in src/users/dto/update-data.dto.ts:28
|
| Public Optional username |
Type : string
|
Decorators :
@IsUrlSafe()
|
|
Defined in src/users/dto/update-data.dto.ts:16
|
import { IsUrlSafe } from '../../common/decorators/urlsafe.decorator';
import {
IsEmail,
IsNotEmpty,
IsOptional,
IsString,
MaxLength,
MinLength,
} from 'class-validator';
import { RegisterRespEnum } from '../../utils/enums/responses/register.enum';
export default class UpdateDataDto {
@IsUrlSafe()
@IsOptional()
@IsString()
public username?: string;
@MinLength(8, {
message: RegisterRespEnum.ERR_PASSWORD_TOOSHORT,
})
@MaxLength(128, {
message: RegisterRespEnum.ERR_PASSWORD_TOOLONG,
})
@IsNotEmpty({
message: RegisterRespEnum.ERR_PASSWORD_INVALID,
})
@IsOptional()
public password?: string;
@IsEmail(undefined, {
message: RegisterRespEnum.ERR_INVALID_EMAIL,
})
@IsNotEmpty({
message: RegisterRespEnum.ERR_INVALID_EMAIL,
})
@IsOptional()
public email?: string;
@IsOptional()
@IsString()
public oldPassword?: string;
}