Files
dh-inspeccion-v2/api-v3/src/administration/roles/dto/update-role.dto.ts
T

19 lines
488 B
TypeScript

import { Transform } from 'class-transformer';
import { IsOptional, IsString, MaxLength, MinLength } from 'class-validator';
export class UpdateRoleDto {
@Transform(({ value }) => (typeof value === 'string' ? value.trim() : value))
@IsOptional()
@IsString()
@MinLength(1)
@MaxLength(120)
name?: string;
@Transform(({ value }) => (typeof value === 'string' ? value.trim() : value))
@IsOptional()
@IsString()
@MinLength(1)
@MaxLength(1000)
description?: string;
}