class-validator#ValidatePromise TypeScript Examples

The following examples show how to use class-validator#ValidatePromise. 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: whisp-attachment.entity.ts    From whispr with MIT License 5 votes vote down vote up
@Field({
    description: 'Key in S3-Bucket. Call via API: <whispr-Backend>/file/<S3-Key>',
  })
  @ValidatePromise()
  file: string;
Example #2
Source File: whisp-file-upload.input.ts    From whispr with MIT License 5 votes vote down vote up
@Field(() => GraphQLUpload, { nullable: true })
  @IsOptional()
  @ValidatePromise()
  newFile?: Promise<FileUpload>;