Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ValidationPipeOptions

Hierarchy

Index

Properties

Optional disableErrorMessages

disableErrorMessages: boolean

Optional dismissDefaultMessages

dismissDefaultMessages: boolean

If set to true, the validation will not use default messages. Error message always will be undefined if its not explicitly set.

Optional errorHttpStatusCode

errorHttpStatusCode: ErrorHttpStatusCode

Optional exceptionFactory

exceptionFactory: (errors: ValidationError[]) => any

Type declaration

Optional expectedType

expectedType: Type<any>

Optional forbidNonWhitelisted

forbidNonWhitelisted: boolean

If set to true, instead of stripping non-whitelisted properties validator will throw an error

Optional forbidUnknownValues

forbidUnknownValues: boolean

Settings true will cause fail validation of unknown objects.

Optional groups

groups: string[]

Groups to be used during validation of the object.

Optional skipMissingProperties

skipMissingProperties: boolean

If set to true then validator will skip validation of all properties that are null or undefined in the validating object.

Optional skipNullProperties

skipNullProperties: boolean

If set to true then validator will skip validation of all properties that are null in the validating object.

Optional skipUndefinedProperties

skipUndefinedProperties: boolean

If set to true then validator will skip validation of all properties that are undefined in the validating object.

Optional transform

transform: boolean

Optional transformOptions

transformOptions: ClassTransformOptions

Optional validateCustomDecorators

validateCustomDecorators: boolean

Optional validationError

validationError: { target?: boolean; value?: boolean }

ValidationError special options.

Type declaration

  • Optional target?: boolean

    Indicates if target should be exposed in ValidationError.

  • Optional value?: boolean

    Indicates if validated value should be exposed in ValidationError.

Optional whitelist

whitelist: boolean

If set to true validator will strip validated object of any properties that do not have any decorators.

Tip: if no other decorator is suitable for your property use @Allow decorator.

Generated using TypeDoc