requests fix

This commit is contained in:
2026-06-10 15:11:24 +03:30
parent 996a4fcda7
commit 884a9c7f11
5 changed files with 286 additions and 36 deletions

View File

@@ -2,9 +2,9 @@ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { IsIn, IsNotEmpty, IsOptional, IsString, Length, Matches } from 'class-validator';
export class SayahRequestDto {
@ApiProperty({ example: '0', description: '0 for natural person' })
@ApiProperty({ example: '1', description: '1 for natural person (always use "1")' })
@IsString()
@IsIn(['0'])
@IsIn(['1'])
accountOwnerType!: string;
@ApiProperty({ example: '4311402422', description: 'Iranian national code (10 digits)' })
@@ -19,7 +19,7 @@ export class SayahRequestDto {
@IsString()
legalId?: string | null;
@ApiProperty({ example: 'IR000000000000000000000000', description: 'Iranian Sheba ID' })
@ApiProperty({ example: 'IR800560611828005105117001', description: 'Iranian Sheba ID (26 characters)' })
@IsString()
@Length(26, 26)
@Matches(/^IR\d{24}$/, { message: 'shebaId must start with IR and contain 24 digits' })