Roqueform
    Preparing search index...

    Interface ErrorsMixin<Error>

    The mixin added to the field by the errorsPlugin.

    interface ErrorsMixin<Error = any> {
        errors: readonly Error[];
        isInvalid: boolean;
        addError(error: Error): void;
        clearErrors(options?: ClearErrorsOptions): void;
        deleteError(error: Error): void;
        getInvalidFields(): never[];
    }

    Type Parameters

    • Error = any

      The error associated with the field.

    Index

    Properties

    errors: readonly Error[]

    The array of errors associated with this field.

    isInvalid: boolean

    true if this field has associated errors, or false otherwise.

    Note: Use getInvalidFields to check that this field or any of its descendants are invalid.

    Methods

    • Associates an error with the field.

      Parameters

      • error: Error

        The error to add.

      Returns void

    • Deletes an error associated with this field. No-op if an error isn't associated with this field.

      Parameters

      • error: Error

        The error to delete.

      Returns void

    • Returns all fields that have associated errors.

      Returns never[]