1.4.6 • Published 6 years ago

@nestling/validator v1.4.6

Weekly downloads
-
License
MIT
Repository
github
Last release
6 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

6 years ago

1.4.5

7 years ago

1.4.4

7 years ago

1.4.3

7 years ago

1.4.2

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.1.0

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago