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 {IsNotEmpty, IsString } from 'class-validator';
|
||||||
import { ApiProperty } from '@nestjs/swagger';
|
import { ApiProperty } from '@nestjs/swagger';
|
||||||
|
import { Transform } from 'class-transformer';
|
||||||
|
|
||||||
export class CreateUserDto {
|
export class CreateUserDto {
|
||||||
@ApiProperty({ example: 'Jane Doe', description: 'Full name of the user' })
|
@ApiProperty({ example: 'Jane Doe', description: 'Full name of the user' })
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
@IsString()
|
@IsString()
|
||||||
|
@Transform(({value})=>value?.trim().toLowerCase())
|
||||||
name!: string;
|
name!: string;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user