fix: align admin profile request validation

This commit is contained in:
Bastian Wagner
2026-08-01 11:20:47 +02:00
parent d962200b79
commit 431eba86e7
4 changed files with 41 additions and 8 deletions

View File

@@ -7,20 +7,21 @@ import {
Max,
MaxLength,
Min,
ValidateIf,
} from 'class-validator';
import { RoleEnum } from '../../roles/roles.enum';
import { StatusEnum } from '../../statuses/statuses.enum';
export class AdminUserProfileDto {
@IsOptional()
@ValidateIf((_, value) => value !== undefined)
@IsString()
@MaxLength(255)
firstName?: string | null;
firstName?: string;
@IsOptional()
@ValidateIf((_, value) => value !== undefined)
@IsString()
@MaxLength(255)
lastName?: string | null;
lastName?: string;
}
export class AdminUserRoleDto {