mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-26 16:44:54 +00:00
feat: adding enhancment for zod admin portal kyc and add customer additional fields
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user