class-validator#ArrayMinSize TypeScript Examples

The following examples show how to use class-validator#ArrayMinSize. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: data_source.ts    From Deep-Lynx with MIT License 5 votes vote down vote up
// artifact types dictate to Jazz how to limit the return to user defined or general artifact types - we cannot set
    // sane defaults for this as the artifact type names vary widely between projects - enforce that we have at least one
    // item in the array however
    @IsArray()
    @ArrayMinSize(1)
    artifact_types: string[] = [];
Example #2
Source File: upsert-blocks.dto.ts    From ironfish-api with Mozilla Public License 2.0 5 votes vote down vote up
@IsArray()
  @ArrayMinSize(1)
  @ValidateNested({ each: true })
  @Type(() => TransactionDto)
  readonly transactions!: TransactionDto[];
Example #3
Source File: upsert-blocks.dto.ts    From ironfish-api with Mozilla Public License 2.0 5 votes vote down vote up
@IsArray()
  @ArrayMinSize(1)
  @ArrayMaxSize(3000)
  @ValidateNested({ each: true })
  @Type(() => BlockDto)
  readonly blocks!: BlockDto[];
Example #4
Source File: upsert-deposit.dto.ts    From ironfish-api with Mozilla Public License 2.0 5 votes vote down vote up
@IsArray()
  @ArrayMinSize(1)
  @ValidateNested({ each: true })
  @Type(() => UpsertDepositsNoteDto)
  readonly notes!: UpsertDepositsNoteDto[];
Example #5
Source File: upsert-deposit.dto.ts    From ironfish-api with Mozilla Public License 2.0 5 votes vote down vote up
@IsArray()
  @ArrayMinSize(1)
  @ValidateNested({ each: true })
  @Type(() => UpsertDepositsOperationDto)
  readonly operations!: UpsertDepositsOperationDto[];
Example #6
Source File: upsert-transactions.dto.ts    From ironfish-api with Mozilla Public License 2.0 5 votes vote down vote up
@IsArray()
  @ArrayMinSize(1)
  @ArrayMaxSize(3000)
  @ValidateNested({ each: true })
  @Type(() => TransactionDto)
  readonly transactions!: TransactionDto[];