class-validator#ArrayMaxSize TypeScript Examples
The following examples show how to use
class-validator#ArrayMaxSize.
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: write-telemetry-points.dto.ts From ironfish-api with Mozilla Public License 2.0 | 6 votes |
@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 #2
Source File: upsert-blocks.dto.ts From ironfish-api with Mozilla Public License 2.0 | 5 votes |
@IsArray()
@ArrayMinSize(1)
@ArrayMaxSize(3000)
@ValidateNested({ each: true })
@Type(() => BlockDto)
readonly blocks!: BlockDto[];
Example #3
Source File: write-telemetry-points.dto.ts From ironfish-api with Mozilla Public License 2.0 | 5 votes |
@IsArray()
@ArrayMaxSize(3000)
@ValidateNested({ each: true })
@Type(() => TagDto)
readonly tags!: TagDto[];
Example #4
Source File: write-telemetry-points.dto.ts From ironfish-api with Mozilla Public License 2.0 | 5 votes |
@IsArray()
@ArrayMaxSize(3000)
@ValidateNested({ each: true })
@Type(() => WriteTelemetryPointDto)
readonly points!: WriteTelemetryPointDto[];
Example #5
Source File: upsert-transactions.dto.ts From ironfish-api with Mozilla Public License 2.0 | 5 votes |
@IsArray()
@ArrayMinSize(1)
@ArrayMaxSize(3000)
@ValidateNested({ each: true })
@Type(() => TransactionDto)
readonly transactions!: TransactionDto[];