forked from Shared/esg
requests fix
This commit is contained in:
@@ -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' })
|
||||
|
||||
Reference in New Issue
Block a user