Skip to content

ValidationErrorMapBuilder

Defined in: error.ts:34

Builder for collecting validation errors

Key features:

  • Collects errors for multiple keys
  • Can invalidate the target object itself

readonly hasError: boolean

Defined in: error.ts:55

Whether the builder has any errors


invalidate(key, reason): void

Defined in: error.ts:44

Add an error for a key

keyof T & string

Key to invalidate

string | Error

Error message or Error object

void

Multiple reasons can be added for the same key.


invalidateSelf(reason): void

Defined in: error.ts:52

Invalidate the target object itself

string | Error

void

This is useful with @nested.hoist to invalidate the parent object.