I need to allow the user to enter the property name in both upper and lower cases. For example,
DTO:
import { ApiProperty } from "@nestjs/swagger";
import { IsDefined, Validate } from "class-validator";
export class DicomDto {
@ApiProperty({ description: 'Image data' })
@IsDefined()
'7fe0,0010'?: string;
}
Here I want the user can give input as both '7fe0,0010' or '7FE0,0010'. But the user should enter only one case either '7fe0,0010' or '7FE0,0010', not both at same time.
For example, input should be,
{
'7fe0,0010': "imagedata" or '7FE0,0010': "imagedata"
}
but input should not be,
{
'7fe0,0010': "imagedata",
'7FE0,0010': "imagedata"
}
Could you please help me is there any chance.