improvement: error handeling structure changed and unified all across the app. user no longer sees inappropriate messages.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user