class-validator#IsNumberString TypeScript Examples

The following examples show how to use class-validator#IsNumberString. 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: Pagination.ts    From tatum-blockchain-connector with MIT License 5 votes vote down vote up
@IsNumberString()
  @Matches(/[0-9]+/)
  @IsNotEmpty()
  @ValidateIf(o => o.count !== 'true')
  @IsInRange(1, 50)
  public pageSize: string;
Example #2
Source File: Pagination.ts    From tatum-blockchain-connector with MIT License 5 votes vote down vote up
@IsNumberString()
  @Matches(/[0-9]+/)
  @IsOptional()
  public offset?: string;
Example #3
Source File: PathAddressContractAddressI.ts    From tatum-blockchain-connector with MIT License 5 votes vote down vote up
@IsNumberString()
  @Matches(/[0-9]+/)
  public i: string;
Example #4
Source File: PathI.ts    From tatum-blockchain-connector with MIT License 5 votes vote down vote up
@IsNumberString()
  @Matches(/[0-9]+/)
  public i: string;
Example #5
Source File: Pagination.ts    From tatum-blockchain-connector with MIT License 5 votes vote down vote up
@IsNumberString()
  @Matches(/[0-9]+/)
  @IsNotEmpty()
  @ValidateIf(o => o.count !== 'true')
  @IsInRange(1, 50)
  public pageSize: string;
Example #6
Source File: Pagination.ts    From tatum-blockchain-connector with MIT License 5 votes vote down vote up
@IsNumberString()
  @Matches(/[0-9]+/)
  @IsOptional()
  public offset?: string;
Example #7
Source File: Fee.ts    From tatum-blockchain-connector with MIT License 5 votes vote down vote up
@IsNotEmpty()
    @IsNumberString()
    @Matches(/^[+]?((\d+(\.\d*)?)|(\.\d+))$/)
    public gasLimit: string;
Example #8
Source File: Fee.ts    From tatum-blockchain-connector with MIT License 5 votes vote down vote up
@IsNotEmpty()
    @IsNumberString()
    @Matches(/^[+]?((\d+(\.\d*)?)|(\.\d+))$/)
    public gasPrice: string;
Example #9
Source File: PathAddressContractAddressI.ts    From tatum-blockchain-connector with MIT License 5 votes vote down vote up
@IsNumberString()
    @Matches(/[0-9]+/)
    public i: string;
Example #10
Source File: PathXpubI.ts    From tatum-blockchain-connector with MIT License 5 votes vote down vote up
@IsNumberString()
    @Matches(/[0-9]+/)
    public i: string;
Example #11
Source File: PathAddressContractAddressChain.ts    From tatum-blockchain-connector with MIT License 5 votes vote down vote up
@IsNotEmpty()
    @IsNumberString()
    public tokenId: string;
Example #12
Source File: PathHeight.ts    From tatum-blockchain-connector with MIT License 5 votes vote down vote up
@IsNotEmpty()
    @IsNumberString()
    @Matches(/[0-9]+/)
    public height: string;
Example #13
Source File: PathBlockNumber.ts    From tatum-blockchain-connector with MIT License 5 votes vote down vote up
@IsNotEmpty()
    @IsNumberString()
    public blockNumber: string;