feat: adding enhancment for zod admin portal kyc and add customer additional fields

This commit is contained in:
Abdalhamid Alhamad
2025-03-02 10:49:58 +03:00
parent dae9cb6323
commit 54ce5b022d
11 changed files with 242 additions and 16 deletions

View File

@ -3,6 +3,7 @@ import { IsDateString, IsEmail, IsEnum, IsNotEmpty, IsString, IsUUID, Matches }
import { i18nValidationMessage as i18n } from 'nestjs-i18n';
import { COUNTRY_CODE_REGEX } from '~/auth/constants';
import { IsValidPhoneNumber } from '~/core/decorators/validations';
import { Gender } from '~/customer/enums';
import { Relationship } from '~/junior/enums';
export class CreateJuniorRequestDto {
@ApiProperty({ example: '+962' })
@ -27,6 +28,10 @@ export class CreateJuniorRequestDto {
@IsNotEmpty({ message: i18n('validation.IsNotEmpty', { path: 'general', property: 'customer.lastName' }) })
lastName!: string;
@ApiProperty({ example: 'MALE' })
@IsEnum(Gender, { message: i18n('validation.IsEnum', { path: 'general', property: 'customer.gender' }) })
gender!: string;
@ApiProperty({ example: '2020-01-01' })
@IsDateString({}, { message: i18n('validation.IsDateString', { path: 'general', property: 'customer.dateOfBirth' }) })
dateOfBirth!: Date;