import { ApiProperty } from '@nestjs/swagger'; import { IsNotEmpty, IsString } from 'class-validator'; import { i18nValidationMessage as i18n } from 'nestjs-i18n'; export class AppleAdditionalData { @ApiProperty({ example: 'Ahmad' }) @IsString({ message: i18n('validation.IsString', { path: 'general', property: 'customer.firstName' }) }) @IsNotEmpty({ message: i18n('validation.IsNotEmpty', { path: 'general', property: 'customer.firstName' }) }) firstName!: string; @ApiProperty({ example: 'Khan' }) @IsString({ message: i18n('validation.IsString', { path: 'general', property: 'customer.lastName' }) }) @IsNotEmpty({ message: i18n('validation.IsNotEmpty', { path: 'general', property: 'customer.lastName' }) }) lastName!: string; }