Class: ValidationAggregator
Constructors
constructor
• new ValidationAggregator(path, errors)
Parameters
| Name | Type |
|---|---|
path | string |
errors | ValidationError[] |
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
| Name | Type |
|---|---|
error | string | Error |
Returns
Defined in
packages/entity/src/ValidationAggregator.ts:44
fail
▸ fail(error): AggregatedValidationError
Parameters
| Name | Type |
|---|---|
error | string | Error |
Returns
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
| Name | Type |
|---|---|
...paths | (string | number)[] |
Returns
Defined in
packages/entity/src/ValidationAggregator.ts:36
wrap
▸ wrap<T>(func): AggregatedValidationError | T
Type parameters
| Name |
|---|
T |
Parameters
| Name | Type |
|---|---|
func | () => T |
Returns
Defined in
packages/entity/src/ValidationAggregator.ts:24
create
▸ Static create(): ValidationAggregator