Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • TValue: object

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected allowUnknownKeysAndValues

allowUnknownKeysAndValues: boolean = false

Protected conditionalValidationDefinitions

conditionalValidationDefinitions: ValidationDefinition[] = []

Protected immutableMode

immutableMode: boolean = true

Protected Optional objectShape

objectShape: ObjectShape<TValue>

Protected sanitizerDefinitions

sanitizerDefinitions: SanitizerDefinition[] = []

Protected Optional unknownKeysSchema

unknownKeysSchema: StringSchema

Protected Optional unknownValuesSchema

unknownValuesSchema: StringSchema

Protected validationDefinitions

validationDefinitions: ValidationDefinition[] = []

Methods

Protected addConditionalValidationDefinition

Protected addSanitizerDefinition

Protected addValidationDefinition

allowUnknownKeys

  • allowUnknownKeys(): this

also

and

Protected clone

  • clone(): this

Protected cloneInstance

  • cloneInstance(): this

Protected customSanitizeBehavior

  • customSanitizeBehavior<TValue, TSanitizedValue>(value: TValue): TSanitizedValue

Protected customSanitizeBehaviorAsync

  • customSanitizeBehaviorAsync<TValue, TSanitizedValue>(value: TValue): Promise<TSanitizedValue>

Protected customTestingBehavior

  • customTestingBehavior(value: any, testResult: boolean): boolean

Protected customTestingBehaviorAsync

  • customTestingBehaviorAsync(value: any, testResult: boolean): Promise<boolean>

Protected customValidationBehavior

Protected customValidationBehaviorAsync

disallowUnknownKeys

  • disallowUnknownKeys(): this

equals

map

optional

or

Protected removeValidationDefinitionsOfType

required

sanitize

  • sanitize<TValue, TSanitizedValue>(value: TValue): TSanitizedValue

sanitizeAndTest

  • sanitizeAndTest<TValue, TSanitizedValue>(value: any): [boolean, TSanitizedValue]

sanitizeAndTestAsync

  • sanitizeAndTestAsync<TValue, TSanitizedValue>(value: any): Promise<[boolean, TSanitizedValue]>

sanitizeAndValidate

  • sanitizeAndValidate<TValue, TSanitizedValue>(value: any): [ValidationError[] | undefined, TSanitizedValue]

sanitizeAndValidateAsync

  • sanitizeAndValidateAsync<TValue, TSanitizedValue>(value: any): Promise<[ValidationError[] | undefined, TSanitizedValue]>

sanitizeAsync

  • sanitizeAsync<TValue, TSanitizedValue>(value: TValue): Promise<TSanitizedValue>

sanitizer

shape

shapeUnknownKeys

shapeUnknownValues

  • shapeUnknownValues(unknownValuesSchema: StringSchema): this

Protected skipClone

  • skipClone(fn: () => void): void

test

  • test(value: any): boolean

testAsync

  • testAsync(value: any): Promise<boolean>

toCamelCaseKeys

  • toCamelCaseKeys(): this

toCamelCaseKeysDeep

  • toCamelCaseKeysDeep(): this

toConstantCaseKeys

  • toConstantCaseKeys(): this

toConstantCaseKeysDeep

  • toConstantCaseKeysDeep(): this

toDefault

  • toDefault(defaultValue?: LazyValue<object>): this

toKebabCaseKeys

  • toKebabCaseKeys(): this

toKebabCaseKeysDeep

  • toKebabCaseKeysDeep(): this

toMappedKeys

  • toMappedKeys(mapper: (value: any, key: string) => any): this
  • Parameters

    • mapper: (value: any, key: string) => any
        • (value: any, key: string): any
        • Parameters

          • value: any
          • key: string

          Returns any

    Returns this

toMappedKeysDeep

  • toMappedKeysDeep(mapper: (value: any, key: string) => any): this
  • Parameters

    • mapper: (value: any, key: string) => any
        • (value: any, key: string): any
        • Parameters

          • value: any
          • key: string

          Returns any

    Returns this

toMappedValues

  • toMappedValues(mapper: (value: any, key: string) => any): this
  • Parameters

    • mapper: (value: any, key: string) => any
        • (value: any, key: string): any
        • Parameters

          • value: any
          • key: string

          Returns any

    Returns this

toMappedValuesDeep

  • toMappedValuesDeep(mapper: (value: any, key: string | number) => any): this
  • Parameters

    • mapper: (value: any, key: string | number) => any
        • (value: any, key: string | number): any
        • Parameters

          • value: any
          • key: string | number

          Returns any

    Returns this

toSnakeCaseKeys

  • toSnakeCaseKeys(): this

toSnakeCaseKeysDeep

  • toSnakeCaseKeysDeep(): this

validate

validateAsync

validator