Skip to main content
Version: 1.x

Class: ValidationAggregator

Constructors

constructor

new ValidationAggregator(path, errors)

Parameters

NameType
pathstring
errorsValidationError[]

Defined in

packages/entity/src/ValidationAggregator.ts:18

Accessors

error

get error(): undefined | AggregatedValidationError

Returns

undefined | AggregatedValidationError

Defined in

packages/entity/src/ValidationAggregator.ts:52


hasErrors

get hasErrors(): boolean

Returns

boolean

Defined in

packages/entity/src/ValidationAggregator.ts:73

Methods

addError

addError(error): AggregatedValidationError

Parameters

NameType
errorstring | Error

Returns

AggregatedValidationError

Defined in

packages/entity/src/ValidationAggregator.ts:44


fail

fail(error): AggregatedValidationError

Parameters

NameType
errorstring | Error

Returns

AggregatedValidationError

Defined in

packages/entity/src/ValidationAggregator.ts:67


throwAggregate

throwAggregate(): void

Returns

void

Defined in

packages/entity/src/ValidationAggregator.ts:60


withPath

withPath(...paths): ValidationAggregator

Parameters

NameType
...paths(string | number)[]

Returns

ValidationAggregator

Defined in

packages/entity/src/ValidationAggregator.ts:36


wrap

wrap<T>(func): AggregatedValidationError | T

Type parameters

Name
T

Parameters

NameType
func() => T

Returns

AggregatedValidationError | T

Defined in

packages/entity/src/ValidationAggregator.ts:24


create

Static create(): ValidationAggregator

Returns

ValidationAggregator

Defined in

packages/entity/src/ValidationAggregator.ts:20