Interface DoubterShapePlugin

interface DoubterShapePlugin {
    valueShape: null | Shape<any, any>;
    addError(error: string | Issue): void;
}

Properties

Methods

Properties

valueShape: null | Shape<any, any>

The shape that Doubter uses to validate the field value, or null if there's no shape for this field.

Methods

  • Associates an error with the field.

    If a string is provided it becomes an error message. The error code in this case is set to "custom".

    Parameters

    • error: string | Issue

      The error to add.

    Returns void