Interface RefineOptions

interface RefineOptions {
    code?: any;
    message?:
        | null
        | string
        | number
        | bigint
        | boolean
        | symbol
        | object
        | MessageCallback;
    meta?: any;
    param?: any;
    tolerance?: OperationTolerance;
    type?: any;
}

Hierarchy (view full)

Properties

code?: any

The code of an issue that would be raised if the refinement fails.

"any.refine"
message?:
    | null
    | string
    | number
    | bigint
    | boolean
    | symbol
    | object
    | MessageCallback

The custom issue message.

meta?: any

An arbitrary metadata that is added to an issue.

param?: any

The additional param associated with the operation. Usually contains a type-specific data is used in the Operation.callback.

undefined
tolerance?: OperationTolerance

The operation tolerance for issues that are raised during validation.

"skip"
If preceding operations have raised issues, then this operation is skipped but consequent operations are still applied.
"abort"
If preceding operations have raised issues, then this operation is skipped and consequent operations aren't applied. Also, if this operation itself raises issues then consequent operations aren't applied either.
"auto"
The operation is applied regardless of previously raised issues.
'auto'
type?: any

The type of the operation such as "string.regex" or "array.includes". If omitted then operation callback is used as its type.