class-validator#ValidateNested TypeScript Examples

The following examples show how to use class-validator#ValidateNested. 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: classes.ts    From epicgames-freegames-node with MIT License 6 votes vote down vote up
/**
   * Notification options for just this account. This overrides any global notification configs.
   *
   * You may configure multiple notifiers, and they will all be triggered simultaneously.
   */
  @IsOptional()
  @ValidateNested()
  @IsArray()
  @Type(() => NotifierConfig, {
    discriminator: {
      property: 'type',
      subTypes: notifierSubtypes,
    },
  })
  notifiers?: AnyNotifierConfig[];
Example #2
Source File: write-telemetry-points.dto.ts    From ironfish-api with Mozilla Public License 2.0 6 votes vote down vote up
@IsArray()
  @ArrayMaxSize(3000)
  @ValidateNested({ each: true })
  @Type(() => BaseFieldDto, {
    keepDiscriminatorProperty: true,
    discriminator: {
      property: 'type',
      subTypes: [
        { name: 'boolean', value: BooleanFieldDto },
        { name: 'float', value: FloatFieldDto },
        { name: 'integer', value: IntegerFieldDto },
        { name: 'string', value: StringFieldDto },
      ],
    },
  })
  readonly fields!: FieldDto[];
Example #3
Source File: classes.ts    From epicgames-freegames-node with MIT License 6 votes vote down vote up
/**
   * Global default notification configuration.
   *
   * You may configure multiple notifiers, and they will all be triggered simultaneously.
   */
  @IsOptional()
  @ValidateNested()
  @IsArray()
  @Type(() => NotifierConfig, {
    discriminator: {
      property: 'type',
      subTypes: notifierSubtypes,
    },
  })
  notifiers?: AnyNotifierConfig[];
Example #4
Source File: task.ts    From Deep-Lynx with MIT License 6 votes vote down vote up
@ValidateNested()
    @Type(() => BaseTaskConfig, {
        keepDiscriminatorProperty: true,
        discriminator: {
            property: 'kind',
            subTypes: [
                {value: HpcTaskConfig, name: 'hpc'},
            ],
        },
    })
    config?: BaseTaskConfig | HpcTaskConfig;
Example #5
Source File: entity-list-relation-filter.template.ts    From amplication with Apache License 2.0 6 votes vote down vote up
@ApiProperty({
    required: false,
    type: () => WHERE_INPUT,
  })
  @ValidateNested()
  @Type(() => WHERE_INPUT)
  @IsOptional()
  @Field(() => WHERE_INPUT, {
    nullable: true,
  })
  none?: WHERE_INPUT;
Example #6
Source File: container.ts    From Deep-Lynx with MIT License 5 votes vote down vote up
@ValidateNested()
    @Type(() => ContainerConfig)
    config?: ContainerConfig;
Example #7
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 #8
Source File: task.ts    From Deep-Lynx with MIT License 5 votes vote down vote up
@ValidateNested()
    user?: User
Example #9
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 #10
Source File: type_transformation.ts    From Deep-Lynx with MIT License 5 votes vote down vote up
@ValidateNested()
    @Type(() => TransformationConfiguration)
    config: TransformationConfiguration = new TransformationConfiguration();
Example #11
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 #12
Source File: rsa.ts    From Deep-Lynx with MIT License 5 votes vote down vote up
@IsArray()
    @ValidateNested()
    @Type(() => RequiredMethods)
    requiredMethods?: RequiredMethods[];
Example #13
Source File: write-telemetry-points.dto.ts    From ironfish-api with Mozilla Public License 2.0 5 votes vote down vote up
@IsArray()
  @ArrayMaxSize(3000)
  @ValidateNested({ each: true })
  @Type(() => TagDto)
  readonly tags!: TagDto[];
Example #14
Source File: create-diagnosis-keys.dto.ts    From mamori-i-japan-api with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@ApiProperty({ type: TempIDDto, isArray: true })
  @IsArray()
  @ValidateNested({ each: true })
  @Type(() => TempIDDto)
  tempIDs: TempIDDto[]
Example #15
Source File: create-user.dto.ts    From nestjs-starter with MIT License 5 votes vote down vote up
@ApiProperty({ description: 'Additional user metadata or custom fields', type: CreateUserMetadataDto, isArray: true })
  @IsArray()
  @ValidateNested({ each: true })
  @Type(() => CreateUserMetadataDto)
  @IsOptional()
  metadata: CreateUserMetadataDto[];
Example #16
Source File: class-validator.ts    From pebula-node with MIT License 5 votes vote down vote up
@ValidateNested()
  @Type(() => DeeplyNestedType)
  deeplyNested!: DeeplyNestedType;
Example #17
Source File: e2e.test.ts    From next-api-decorators with MIT License 5 votes vote down vote up
@Type(() => Address)
  @ValidateNested()
  @IsOptional()
  public addresses?: Address[];
Example #18
Source File: create-many-user.args.ts    From prisma-nestjs-graphql with MIT License 5 votes vote down vote up
@Field(() => [UserCreateManyInput], { nullable: false })
  @Type(() => UserCreateManyInput)
  @ValidateNested()
  @Type(() => UserCreateManyInput)
  data!: Array<UserCreateManyInput>;
Example #19
Source File: vulnerabilities.ts    From crossfeed with Creative Commons Zero v1.0 Universal 5 votes vote down vote up
@Type(() => VulnerabilityFilters)
  @ValidateNested()
  @IsObject()
  @IsOptional()
  filters?: VulnerabilityFilters;
Example #20
Source File: user-response.dto.ts    From nest-js-boilerplate with MIT License 5 votes vote down vote up
@ValidateNested({ each: true })
  @Type(() => UserResponseDto)
  data?: UserResponseDto[] = []
Example #21
Source File: hero-damaged-enemy.event.ts    From nestjs-geteventstore with MIT License 5 votes vote down vote up
@ValidateNested()
  @Type(() => HeroDamagedEnemyDto)
  public declare data: HeroDamagedEnemyDto;
Example #22
Source File: whisp.input.ts    From whispr with MIT License 5 votes vote down vote up
@Field(() => [WhispAttachmentInput], { nullable: true })
  @IsObject({ each: true })
  @IsOptional({ each: true })
  @ValidateNested({ each: true })
  @Type(() => WhispAttachmentInput)
  attachments?: WhispAttachmentInput[];
Example #23
Source File: update-site.dto.ts    From aqualink-app with MIT License 5 votes vote down vote up
@IsOptional()
  @IsObject()
  @ValidateNested()
  @Type(() => Coordinates)
  readonly coordinates?: Coordinates;
Example #24
Source File: KnowledgeVector.ts    From IBM-HyperProtectMBaaS with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Column("Process")
  @IsDefined()
  @jsonArrayMember(Process)
  @ValidateNested()
  @IsNotEmpty()
  processes: Process[];
Example #25
Source File: domains.ts    From crossfeed with Creative Commons Zero v1.0 Universal 5 votes vote down vote up
@Type(() => DomainFilters)
  @ValidateNested()
  @IsObject()
  @IsOptional()
  filters?: DomainFilters;
Example #26
Source File: rsa.ts    From Deep-Lynx with MIT License 5 votes vote down vote up
@ValidateNested()
    @Type(() => Prompt)
    prompt?: Prompt;
Example #27
Source File: classes.ts    From epicgames-freegames-node with MIT License 5 votes vote down vote up
/**
   * Auth settings for SMTP
   */
  @IsOptional()
  @ValidateNested()
  @Type(() => EmailAuthConfig)
  auth?: EmailAuthConfig;
Example #28
Source File: config.ts    From ts-di-starter with MIT License 5 votes vote down vote up
@IsInstance(RedisConfig)
  @ValidateNested()
  redis: RedisConfigInterface;
Example #29
Source File: rsa.ts    From Deep-Lynx with MIT License 5 votes vote down vote up
@IsArray()
    @ValidateNested()
    @Type(() => CollectedInput)
    collectedInputs?: CollectedInput[];