class-validator#IsInt TypeScript Examples
The following examples show how to use
class-validator#IsInt.
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: blocks-query.dto.ts From ironfish-api with Mozilla Public License 2.0 | 6 votes |
@ApiPropertyOptional({
description: 'Greater than or equal to filter for Block sequence',
})
@Max(Number.MAX_SAFE_INTEGER)
@Min(1)
@IsOptional()
@IsInt()
@Type(() => Number)
readonly sequence_gte?: number;
Example #2
Source File: classes.ts From epicgames-freegames-node with MIT License | 6 votes |
/**
* The priority level sent with the message.
* @example 7
* @default 5
* @env GOTIFY_PRIORITY
*/
@IsInt()
@Min(0)
@Max(10)
@IsOptional()
priority = 5;
Example #3
Source File: page-options.dto.ts From bank-server with MIT License | 6 votes |
@ApiPropertyOptional({
minimum: 1,
default: 1,
})
@Type(() => Number)
@IsInt()
@Min(1)
@IsOptional()
readonly page?: number = 1;
Example #4
Source File: classes.ts From epicgames-freegames-node with MIT License | 6 votes |
/**
* In seconds, how long before a [stuck Chromium process](https://github.com/claabs/epicgames-freegames-node/issues/164) times out and gets restarted
* @example 30
* @default 15
* @env BROWSER_LAUNCH_TIMEOUT
*/
@IsOptional()
@IsInt()
@Min(1)
browserLaunchTimeout = process.env.BROWSER_LAUNCH_TIMEOUT
? parseInt(process.env.BROWSER_LAUNCH_TIMEOUT, 10)
: 15;
Example #5
Source File: create-admin.dto.ts From mamori-i-japan-api with BSD 2-Clause "Simplified" License | 5 votes |
@ApiPropertyOptional({
description: 'Optional, needed when admin role is PREFECTURE_ADMIN_ROLE',
})
@ValidateIf((o) => o.adminRole === AdminRole.prefectureAdminRole)
@IsInt()
@Min(0)
@Max(47)
prefectureId: number
Example #6
Source File: product.entity.ts From rest-api.ts with MIT License | 5 votes |
@IsInt()
@Min(0)
@Column({type: 'integer', default: 0})
quantity: number = 0;
Example #7
Source File: upsert-transactions.dto.ts From ironfish-api with Mozilla Public License 2.0 | 5 votes |
@Max(Number.MAX_SAFE_INTEGER)
@IsInt()
@Type(() => Number)
readonly size!: number;
Example #8
Source File: index.ts From office-hours with GNU General Public License v3.0 | 5 votes |
@IsInt()
queueId!: number;
Example #9
Source File: user.dto.ts From nest-amqp with MIT License | 5 votes |
@IsInt()
public readonly age: number;
Example #10
Source File: GeneratePrivateKey.ts From tatum-blockchain-connector with MIT License | 5 votes |
@IsNotEmpty()
@IsInt()
@Min(0)
@Max(2147483647)
public index: number;
Example #11
Source File: e2e.test.ts From next-api-decorators with MIT License | 5 votes |
@IsInt()
public birthYear!: number;
Example #12
Source File: index.ts From office-hours with GNU General Public License v3.0 | 5 votes |
@IsInt()
targetUserId!: number;
Example #13
Source File: login-normal-user.dto.ts From mamori-i-japan-api with BSD 2-Clause "Simplified" License | 5 votes |
@ApiProperty()
@IsInt()
@Min(0)
@Max(47)
prefecture: number
Example #14
Source File: index.ts From office-hours with GNU General Public License v3.0 | 5 votes |
@IsInt()
@IsOptional()
queueId?: number;
Example #15
Source File: Quota.ts From tezos-academy with MIT License | 5 votes |
@Property({ nullable: true, optional: true })
@IsOptional()
@IsInt()
count?: number
Example #16
Source File: create-user.dto.ts From mamori-i-japan-api with BSD 2-Clause "Simplified" License | 5 votes |
@ApiPropertyOptional({ example: 14 })
@IsOptional()
@IsInt()
@Min(0)
@Max(47)
prefecture: number
Example #17
Source File: calendar.dto.ts From life-helper-backend with MIT License | 5 votes |
@IsOptional()
@IsInt()
@Min(1)
project_id: number
Example #18
Source File: filter-survey-point.dto.ts From aqualink-app with MIT License | 5 votes |
@ApiProperty({ example: 1 })
@IsOptional()
@Type(() => Number)
@IsInt()
readonly siteId?: number;
Example #19
Source File: ReorderTodos.ts From remix-hexagonal-architecture with MIT License | 5 votes |
@Type(() => Number)
@IsInt()
@Min(0)
newIndex!: number;
Example #20
Source File: shared.dto.ts From affinidi-core-sdk with Apache License 2.0 | 5 votes |
@IsOptional()
@IsInt()
@Min(1)
limit?: number
Example #21
Source File: whisp.input.ts From whispr with MIT License | 5 votes |
@Field(() => Int, { nullable: true })
@IsInt()
@IsOptional()
severity?: number;
Example #22
Source File: create-session.dto.ts From etherspot-sdk with MIT License | 5 votes |
@IsOptional()
@IsPositive()
@IsInt()
ttl?: number = null;
Example #23
Source File: user-info.dto.ts From life-helper-backend with MIT License | 5 votes |
/** 性别 */
@IsOptional()
@IsInt()
gender?: number
Example #24
Source File: clusters.ts From Discord-Bot-TypeScript-Template with MIT License | 5 votes |
@IsDefined()
@IsInt()
@IsPositive()
shardCount: number;
Example #25
Source File: calendar.dto.ts From life-helper-backend with MIT License | 5 votes |
@IsOptional()
@IsInt()
@Min(0)
@Max(2)
timeType: number
Example #26
Source File: pagination.dto.ts From etherspot-sdk with MIT License | 5 votes |
@IsOptional()
@IsPositive()
@IsInt()
@Max(100)
limit?: number = null;
Example #27
Source File: weather.dto.ts From life-helper-backend with MIT License | 5 votes |
/** `lng,lat` 格式的经纬度坐标 */
@IsOptional()
@IsInt()
city_id?: number
Example #28
Source File: stage.dto.ts From codeclannigeria-backend with MIT License | 5 votes |
@Expose()
@Min(0)
@IsInt()
level: number;
Example #29
Source File: vulnerabilities.ts From crossfeed with Creative Commons Zero v1.0 Universal | 5 votes |
@IsInt()
@IsOptional()
// If set to -1, returns all results.
pageSize?: number;