mirror of
https://github.com/Kevsl/crypto-exchange-api.git
synced 2026-02-07 18:56:12 +01:00
added more security check rules in dtos
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsString } from 'class-validator';
|
||||
import { IsString, MaxLength, MinLength } from 'class-validator';
|
||||
export class RoleDto {
|
||||
@ApiProperty({
|
||||
type: String,
|
||||
description: 'Role Name',
|
||||
example: 'user',
|
||||
})
|
||||
@MinLength(1)
|
||||
@MaxLength(50)
|
||||
@IsString()
|
||||
name: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user