improvement: error handeling structure changed and unified all across the app. user no longer sees inappropriate messages.

This commit is contained in:
2026-07-12 18:27:38 +03:30
parent 901d838a2c
commit fab5111aa8
45 changed files with 977 additions and 241 deletions

View File

@@ -1,14 +1,16 @@
import { IsString, MinLength } from 'class-validator';
import { ErrorCode } from '../../../common/errors';
export class AcceptStaffInviteDto {
@IsString()
@MinLength(1, { message: ErrorCode.VALIDATION_TOKEN_REQUIRED })
token: string;
@IsString()
@MinLength(8)
@MinLength(8, { message: ErrorCode.VALIDATION_PASSWORD_TOO_SHORT })
password: string;
@IsString()
@MinLength(1)
@MinLength(1, { message: ErrorCode.VALIDATION_NAME_TOO_SHORT })
name: string;
}