applied transformation on username for login
This commit is contained in:
parent
8603bef573
commit
8510d4a7cb
@ -1,9 +1,11 @@
|
||||
import {IsNotEmpty, IsString } from 'class-validator';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { Transform } from 'class-transformer';
|
||||
|
||||
export class CreateUserDto {
|
||||
@ApiProperty({ example: 'Jane Doe', description: 'Full name of the user' })
|
||||
@IsNotEmpty()
|
||||
@IsString()
|
||||
@Transform(({value})=>value?.trim().toLowerCase())
|
||||
name!: string;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user