New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nestjs-db-class-validator

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nestjs-db-class-validator

NestJS module db class validator

  • 1.0.2
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

nestjs-db-class-validator

NPM version npm-typescript License

Installation

  npm install nestjs-db-class-validator
  or
  yarn add nestjs-db-class-validator

Usage :

// main.ts

import { useContainer } from 'class-validator'

async function bootstrap() {
    const app = await NestFactory.create(AppModule)
    app.useGlobalPipes(new ValidationPipe())
    useContainer(app.select(AppModule), { fallbackOnErrors: true })
    ...
}
bootstrap()
// app.module.ts

import { DbClassValidatorModule } from 'nestjs-db-class-validator'

@Module({
  imports: [
    ...
    DbClassValidatorModule
  ],
    ...
})
export class AppModule {}
// x.dto.ts

import { IsUnique } from 'nestjs-db-class-validator'
import { User } from '../entities/user.entity'

export class UserDto {
    @IsUnique(User)
    @IsEmail()
    email: string
}

Keywords

FAQs

Package last updated on 04 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc