Yield generated for f90ccf22-33c0-4c2b-814e-7454d39f89e2
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

54 lines
1.0 KiB

import {
IsArray,
IsEmail,
IsOptional,
IsString,
Min,
MinLength,
} from 'class-validator';
import { Type } from 'class-transformer';
import { ApiModelProperty } from '@nestjs/swagger';
export class UserDtoRegister {
@IsEmail()
@ApiModelProperty({ example: 'foo@bar.fr' })
email: string;
@IsString()
@ApiModelProperty({ example: 'foo' })
firstName: string;
@IsString()
@ApiModelProperty({ example: 'bar' })
lastName: string;
@IsString()
@MinLength(6)
@ApiModelProperty({ example: 'azerty', minLength: 6 })
password: string;
}
export class UserDtoUpdateInfo {
@IsString()
firstName: string;
@IsString()
lastName: string;
}
export class UserDtoUpdatePassword {
@IsString()
@MinLength(6)
@ApiModelProperty({ example: 'azerty', minLength: 6 })
oldPassword: string;
@IsString()
@MinLength(6)
@ApiModelProperty({ example: 'azerty', minLength: 6 })
newPassword: string;
@IsString()
@MinLength(6)
@ApiModelProperty({ example: 'azerty', minLength: 6 })
newPasswordBis: string;
}