import { IsEmail , IsNotEmpty , IsString } from 'class-validator' ; import { Transform } from 'class-transformer' ; export class UserRegistrationData { @ IsNotEmpty ( ) @ IsString ( ) title : string ; @ IsNotEmpty ( ) @ IsString ( ) firstName : string ; @ IsNotEmpty ( ) @ IsString ( ) lastName : string ; @ IsEmail ( ) @ Transform ( ( value ) => value . toLowerCase ( ) ) email : string ; @ IsNotEmpty ( ) @ IsString ( ) telephone : string ; @ IsNotEmpty ( ) @ IsString ( ) password : string ; }