1.4.6 • Published 5 years ago

@nestling/validator v1.4.6

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

Validator Service for NestJS

Usage:

import * as path from 'path'
import { Module } from '@nest/common'
import { ValidatorModule, loadSchemas } from '@nestling/validator'
import { mongoDbKeywords } from '@nestling/validator-keywords-mongodb'

const schemaDir = path.resolve(__dirname, '../../schemas')

const schemas = loadSchemas(schemaDir)
// augment schemas with custom keywords for validation

@Module({
  imports: [
    ValidatorModule.forRoot({
      schemas,
      keywords: {
        ...mongoDbKeywords
      }
    }),
    ...
  ]
})
export class ApplicationModule {}
await this.validatorService.validate('login', user)
1.4.6

5 years ago

1.4.5

6 years ago

1.4.4

6 years ago

1.4.3

6 years ago

1.4.2

6 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.1.0

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago