class-validator#IsInstance TypeScript Examples

The following examples show how to use class-validator#IsInstance. 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: config.ts    From ts-di-starter with MIT License 5 votes vote down vote up
@IsInstance(RedisConfig)
  @ValidateNested()
  redis: RedisConfigInterface;
Example #2
Source File: config.ts    From ts-di-starter with MIT License 5 votes vote down vote up
@IsInstance(GcpConfig)
  @ValidateNested()
  gcp: GcpConfigInterface;
Example #3
Source File: event.ts    From ts-di-starter with MIT License 5 votes vote down vote up
@ValidateNested()
  @IsInstance(EventMetadata)
  metadata: EventMetadataInterface;
Example #4
Source File: Media.ts    From typescript-clean-architecture with MIT License 5 votes vote down vote up
@IsInstance(FileMetadata)
  private metadata: FileMetadata;
Example #5
Source File: Post.ts    From typescript-clean-architecture with MIT License 5 votes vote down vote up
@IsInstance(PostOwner)
  private readonly owner: PostOwner;
Example #6
Source File: Post.ts    From typescript-clean-architecture with MIT License 5 votes vote down vote up
@IsOptional()
  @IsInstance(PostImage)
  private image: Nullable<PostImage>;