Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ValidatorOptions

Options passed to validator during validation.

see

https://github.com/typestack/class-validator

class-validator@0.10.1

publicapi

Hierarchy

Index

Properties

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 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 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