mobx-sentinel API doc
    Preparing search index...

    Class ValidationErrorMapBuilder<T>

    Builder for collecting validation errors

    Key features:

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

    Type Parameters

    • T
    Index

    Accessors

    Methods

    • Add an error for a key

      Parameters

      • key: keyof T & string

        Key to invalidate

      • reason: string | Error

        Error message or Error object

      Returns void

      Multiple reasons can be added for the same key.

    • Invalidate the target object itself

      Parameters

      • reason: string | Error

      Returns void

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