Class: ObjectValidator<T, I>
Type parameters
Name | Type |
---|---|
T | extends object |
I | UndefinedToOptional <T > |
Hierarchy
-
↳
ObjectValidator
Constructors
constructor
• new ObjectValidator<T
, I
>(shape
, strategy?
, constraints?
): ObjectValidator
<T
, I
>
Type parameters
Name | Type |
---|---|
T | extends object |
I | UndefinedToOptional <T > |
Parameters
Name | Type | Default value |
---|---|---|
shape | MappedObjectValidator <T > | undefined |
strategy | ObjectValidatorStrategy | ObjectValidatorStrategy.Ignore |
constraints | readonly IConstraint <I , I >[] | [] |
Returns
ObjectValidator
<T
, I
>
Overrides
Defined in
projects/shapeshift/src/validators/ObjectValidator.ts:25
Properties
constraints
• Protected
constraints: readonly IConstraint
<I
, I
>[] = []
Inherited from
Defined in
projects/shapeshift/src/validators/BaseValidator.ts:17
description
• Optional
description: string
Inherited from
Defined in
projects/shapeshift/src/validators/BaseValidator.ts:15
handleStrategy
• Private
Readonly
handleStrategy: (value
: object
) => Result
<I
, CombinedPropertyError
>
Type declaration
▸ (value
): Result
<I
, CombinedPropertyError
>
Parameters
Name | Type |
---|---|
value | object |
Returns
Result
<I
, CombinedPropertyError
>
Defined in
projects/shapeshift/src/validators/ObjectValidator.ts:19
isValidationEnabled
• Protected
isValidationEnabled: null
| boolean
| () => boolean
= null
Inherited from
BaseValidator.isValidationEnabled
Defined in
projects/shapeshift/src/validators/BaseValidator.ts:18
keys
• Private
Readonly
keys: readonly keyof I
[] = []
Defined in
projects/shapeshift/src/validators/ObjectValidator.ts:18